June 28, 2005
Cool regex stuff…
I was playing around with some regex (regular expression) stuff today and learned about “lookahead” and “lookbehind”.
This expression (?<=\{\{).+(?=\}\}) will return all the characters, numbers and spaces between two curly brackets, but not the brackets themselves.
For example, the string This is {{a test}} of regex returns just a test when the regex is applied.
I also found the Regex Coach which was a great help in debugging the regular expressions.

Comments(1)