


Imagine you are playing Scrabble and need a three-letter word starting with the letter "t" and ending with the letter "n". Matches: cat, catalog, Catherine, sophisticated The period notation If your search is case-insensitive, the words "catalog", "Catherine", or "sophisticated" would also match: Suppose you want to search for a string with the word "cat" in it your regular expression would simply be "cat".
Regex word how to#
In this article, I'll first give you a short primer on regular expressions, and then I'll show you how to use regular expressions with the open source Jakarta-ORO API. What about Java? At the time of this writing, a Java Specification Request that includes a regular expression library for text processing has been approved you can expect to see it in a future version of the JDK.īut what if you need a regular expression library now? Luckily, you can download the open source Jakarta ORO library from. Many languages, including Perl, PHP, Python, JavaScript, and JScript, now support regular expressions for text processing, and some text editors use regular expressions for powerful search-and-replace functionality. If you're unfamiliar with the term, a regular expression is simply a string of characters that defines a pattern used to search for a matching string. If you've programmed in Perl or any other language with built-in regular-expression capabilities, then you probably know how much easier regular expressions make text processing and pattern matching.
