Linux Utilities | Part 2

Linux Utilities | Part 2 Regular expressions:
  • 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
  • Subexpressions:

    You can enclose a portion of a regex between the markers '\(' and '\)'. The entire construct is called a s sub-expression

    Interval Expressions:

    • \{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

    The precedence of the operators is as follows:

    • []
    • * + ?
    • /

Comments

Popular posts from this blog

Laravel | PHP | Basics | Part 2

Apache Hadoop | Running MapReduce Jobs

Parallel Database design, query processing