Regular expressions (regex) are similar to Glob Patterns, but they can only be used for pattern matching, not for filename matching. 1. I know that BASH =~ regex can be system-specific, based on the libs available -- in this case, this is primarily CentOS 6.x (some OSX Mavericks with Macports, but not needed) Thanks! Where in the documentation does it say that . This operator matches the string that comes before it against the regex pattern that follows it. Regular Expression Matching (REMATCH) Match and extract parts of a string using regular expressions. means any character in pattern matching? Regular expressions is not the same as shell pattern matching… Since 3.0, Bash supports the =~ operator to the [[ keyword. It's easy to formulate a regex using what you want to match. And you can use them in a number of different places: After the == in a bash [[ expr ]] expression. Regular expression to match a line that doesn't contain a word. One easy way to exclude text from a match is negative lookbehind: w+b(?