Bash regex matching not working in 4.1. How can I check if a directory exists in a Bash shell script? And while I'm comparing glob patterns to regular expressions, there's an important point to be made that may not be immediately obvious: glob patterns are just another syntax for doing pattern matching in general in bash. Even dash supports [^chars], but not posh. A qualifier identifies what to match and a quantifier tells how often to match the qualifier. Regular expression to match a line that doesn't contain a word. 1. R-egular E-xpression MATCH-ing (the first many times I read the word "rematch", I just could not help my thoughts drifting back to Hulk Hogan taking on André the Giant at WrestleMania IV- those were the days...) is performed using commands on the form: Regular Expression to Given a list of strings (words or other characters), only return the strings that do not match. Does Bash support non-greedy regular expressions? Since 3.0, Bash supports the =~ operator to the [[ keyword. This operator matches the string that comes before it against the regex pattern that follows it. Bash regex, match string beween two strings. 1. Simple Regex match not working. Non greedy text matching and extrapolating in bash. 3866. means any character in pattern matching? One easy way to exclude text from a match is negative lookbehind: w+b(?