10. Some PERL regex rules REGEX Explanation Example . Any single character /a.c/ matches "abc" or "afc" [ ] Single character that is contained within the brackets /[abc]/ matches "a", or "b" or "c" ^ Find from the beginning of the string /^a/ matches " a ku ankka" $ Find from the end of the string /a$/ matches "aku ankk a " | OR /cat|dog/ matches "dog" or "cat" ^ NOT (when used in middle of pattern) /a^aa/ matches "aba" {n,m} Matches min n, max m /a{1,3}/ matches "a", or "aa", or "aaa" * Matches 0-n /a*/ ? Matches 0-1 /(hello)?/ + Matches 1-n /a+/
11.
12.
13. More Perl REGEX Rules REGEX Explanation [a-zA-Z0-9_] ^ [a-zA-Z0-9_] New Line Whitespace / Empty Not whitespaces / Empty Number Not Number