Linux Utilities | Part 2
- The character '^' is special at the beginning of a string
- The character '$' is special at the end of the string
- If you want to use a special character in a apttern, you must quote it, in effect, by escaping it with a preceding backslash (\)
- . => (dot character) matches any single character
- * =>A single character followe by * matches 0 or more occurences of that character
- [set] => A set of charactres in square bracketsmatches any single character from the set
- \{m\}
- \{m,\}
- \{m,n\}
- The first form denotes exactly m occurences belonging to String
- The second form denotes at least m characters belongihng to String
- The third form denotes between m and n characters belonging to String
- []
- * + ?
- /
Subexpressions:
You can enclose a portion of a regex between the markers '\(' and '\)'. The entire construct is called a s sub-expression
Interval Expressions:
The precedence of the operators is as follows:
Comments
Post a Comment