Regular Expressions are a standardized way of matching patterns, used by many programming languages, including Ruby and PHP.
Regular Expressions Info