A regular expression defines a search pattern for strings. This pattern may match one or several times or not at all for a given string. The abbreviation for regular expression is regex.
Regular expressions can helps in
- Searching and pattern matching
- Text replacement
- Collecting information ( word count, no. of spaces, no. of lines)
- Many default operating system programs support regex ( grep, windows search). Some other programs like syntax highlighters and Eclipse Search also use regex power.