logging in or signing up GAJ_ACCPi7_SEMII_RegExp_S8 stormdt Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 10 Category: Education License: All Rights Reserved Like it (0) Dislike it (0) Added: March 22, 2010 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Regular Expressions : Regular Expressions Module Overview : Module Overview Welcome to the module, Regular Expressions. provide a general overview of regular expressions and how they are represented in the java.util.regex package. How to search, edit or manipulate text and data efficiently with the help of regular expressions. In this module, you will learn about: Introduction to Regular Expressions String Literals Character classes Quantifiers Capturing groups Boundary Matchers #1 - Introduction to Regular Expression : #1 - Introduction to Regular Expression Define what is meant by regular expressions. List the important features of the Regular Expression API. Introduction : Introduction Help describing a pattern of text. String consisting of characteristics that matches a string in the set of strings. Use to search, edit and manipulate text based on patterns. “regex” classes belong to java.util. regex Pattern class Matcher class PatternSyntaxException Pattern class : Pattern class Has no public constructors To obtain a pattern object, invoke the compiled method Call compiled method with/without flag value to defines the way the pattern is matched. Methods of Pattern class : Methods of Pattern class Matcher class : Matcher class Interprets the pattern and performs match operations against an input string. Has no public constructors. To obtain a Matcher object by invoking the matcher method on a Pattern object. Methods of Matcher class : Methods of Matcher class PatternSyntaxException class : PatternSyntaxException class Unchecked exception thrown to indicate a syntax error in a regular-expression pattern. Example of Using Regular Expression : Example of Using Regular Expression #2- String Literals : #2- String Literals Describe the String literal Explain the use of metacharacters. String literal : String literal Constant value used to initialize variables. Literals can be: boolean (TRUE or FALSE) numeric (integer, floating point, or fixed point) character-based (a single character or a string) Metacharacters : Metacharacters Special characters which affect the way a pattern is matched. Special characters which behave as metacharacter and supported by the API are: ( [ {\ ^ - $ I ] } ) ? * + . Special characters can be ordinary character by: precede the metacharacter with a backslash (\) enclose the metacharacter by specifying \Q at the beginning and \E at the end Character Classes : Character Classes State the features of simple classes Define the negation technique. Describe what is meant by a range. Define unions and intersections Describe subtraction. List the predefined character classes. Character Classes : Character Classes Set of characters enclosed within square brackets Predefined Character Classes : Predefined Character Classes The shorthands of the character class Quantifiers : Quantifiers Allow to specify the number of occurrences to match against Example of Quantifiers : Example of Quantifiers Capturing Groups : Capturing Groups Outline the technique of numbering. Describe how to use backreferences. Capturing Groups : Capturing Groups Multiple characters are treated as a single unit. The group characters are placed inside single parentheses (). e.g. Expression ((A)(B(C))), there are four groups ((A)(B(C))) (A) (B(C)) (C) groupCount() method of matcher object specifies the number of groups present. Example of Capturing Groups : Example of Capturing Groups Example of Numbering Capture Group : Example of Numbering Capture Group Backreferences : Backreferences Process in which a particular section of the string matching the captured group is kept in memory for future use. Boundary Matchers : Boundary Matchers Define boundary matchers Explain and list the boundary matchers. Boundary Matchers : Boundary Matchers Specifying boundary matchers information to make pattern matches more precise E.g. finding a particular word only if it appears at the beginning or end of a line. Indicates boundary matchers with ^ and $ ^ indicates the beginning of a line $ indicates the end. Listing Boundary Matchers : Listing Boundary Matchers Example of Boundary Matchers : Example of Boundary Matchers That’s about all for today! : That’s about all for today! Use the java.util.regex API for pattern matching with regular expressions. Pattern class Matcher class PatternSyntaxException Working with regular expressions. Character classes Quantifiers Capturing groups Boundary Matchers Thank you all for your attention and patient ! You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
GAJ_ACCPi7_SEMII_RegExp_S8 stormdt Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT lite Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 10 Category: Education License: All Rights Reserved Like it (0) Dislike it (0) Added: March 22, 2010 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Regular Expressions : Regular Expressions Module Overview : Module Overview Welcome to the module, Regular Expressions. provide a general overview of regular expressions and how they are represented in the java.util.regex package. How to search, edit or manipulate text and data efficiently with the help of regular expressions. In this module, you will learn about: Introduction to Regular Expressions String Literals Character classes Quantifiers Capturing groups Boundary Matchers #1 - Introduction to Regular Expression : #1 - Introduction to Regular Expression Define what is meant by regular expressions. List the important features of the Regular Expression API. Introduction : Introduction Help describing a pattern of text. String consisting of characteristics that matches a string in the set of strings. Use to search, edit and manipulate text based on patterns. “regex” classes belong to java.util. regex Pattern class Matcher class PatternSyntaxException Pattern class : Pattern class Has no public constructors To obtain a pattern object, invoke the compiled method Call compiled method with/without flag value to defines the way the pattern is matched. Methods of Pattern class : Methods of Pattern class Matcher class : Matcher class Interprets the pattern and performs match operations against an input string. Has no public constructors. To obtain a Matcher object by invoking the matcher method on a Pattern object. Methods of Matcher class : Methods of Matcher class PatternSyntaxException class : PatternSyntaxException class Unchecked exception thrown to indicate a syntax error in a regular-expression pattern. Example of Using Regular Expression : Example of Using Regular Expression #2- String Literals : #2- String Literals Describe the String literal Explain the use of metacharacters. String literal : String literal Constant value used to initialize variables. Literals can be: boolean (TRUE or FALSE) numeric (integer, floating point, or fixed point) character-based (a single character or a string) Metacharacters : Metacharacters Special characters which affect the way a pattern is matched. Special characters which behave as metacharacter and supported by the API are: ( [ {\ ^ - $ I ] } ) ? * + . Special characters can be ordinary character by: precede the metacharacter with a backslash (\) enclose the metacharacter by specifying \Q at the beginning and \E at the end Character Classes : Character Classes State the features of simple classes Define the negation technique. Describe what is meant by a range. Define unions and intersections Describe subtraction. List the predefined character classes. Character Classes : Character Classes Set of characters enclosed within square brackets Predefined Character Classes : Predefined Character Classes The shorthands of the character class Quantifiers : Quantifiers Allow to specify the number of occurrences to match against Example of Quantifiers : Example of Quantifiers Capturing Groups : Capturing Groups Outline the technique of numbering. Describe how to use backreferences. Capturing Groups : Capturing Groups Multiple characters are treated as a single unit. The group characters are placed inside single parentheses (). e.g. Expression ((A)(B(C))), there are four groups ((A)(B(C))) (A) (B(C)) (C) groupCount() method of matcher object specifies the number of groups present. Example of Capturing Groups : Example of Capturing Groups Example of Numbering Capture Group : Example of Numbering Capture Group Backreferences : Backreferences Process in which a particular section of the string matching the captured group is kept in memory for future use. Boundary Matchers : Boundary Matchers Define boundary matchers Explain and list the boundary matchers. Boundary Matchers : Boundary Matchers Specifying boundary matchers information to make pattern matches more precise E.g. finding a particular word only if it appears at the beginning or end of a line. Indicates boundary matchers with ^ and $ ^ indicates the beginning of a line $ indicates the end. Listing Boundary Matchers : Listing Boundary Matchers Example of Boundary Matchers : Example of Boundary Matchers That’s about all for today! : That’s about all for today! Use the java.util.regex API for pattern matching with regular expressions. Pattern class Matcher class PatternSyntaxException Working with regular expressions. Character classes Quantifiers Capturing groups Boundary Matchers Thank you all for your attention and patient !