Linux Bash Scripting Tutorial


Regular Expressions

A sequence of characters that have certain patterns of text (with meta-characters), which will be searched from larger text or file.

	^ (caret) Beginning of the line
	$ (dollar) End of the line
	. (dot)  Match single character
	* (asterisk) Match any number of character i.e zero or more characters
	[] (brackets) Enclose character set to match
	\ (backslash) Escape. interpret following character literally
	\<..\> (angel brackets, escaped)  word boundary
	
Character matches
-----------------
	\{..\}  Escaped curly brackets
	[::]  POSIX character classes
	

ADS