Apparently TextMate uses something called “Oniguruma” for its regular expressions syntax. An overview of the syntax can be found here: http://manual.macromates.com/en/regular_expressions.

I needed to match literals of unknown length today, more specifically the following expression:

<li><a href = "http://url.com"> |

where url.com could be any valid URL</span>. In Onigurama syntax, you can match all those expressions using the following regular expression:

The quantifiers and anchors will cover a broad range of regexp needs, an extract of the syntax:

4. Quantifier
greedy
? 1 or 0 times
* 0 or more times
+ 1 or more times
{n,m} at least n but not more than m times
{n,} at least n times
{,n} at least 0 but not more than n times ({0,n})
{n} n times
reluctant
?? 1 or 0 times
*? 0 or more times
+? 1 or more times
{n,m}? at least n but not more than m times
{n,}? at least n times
{,n}? at least 0 but not more than n times (== {0,n}?)
possessive (greedy and does not backtrack after repeated)
?+ 1 or 0 times
*+ 0 or more times
++ 1 or more times
({n,m}+, {n,}+, {n}+ are possessive op. in ONIG_SYNTAX_JAVA only)
ex. /a*+/ === /(?>a*)/
5. Anchors
^ beginning of the line
$ end of the line
\b word boundary
\B not word boundary
\A beginning of string
\Z end of string, or before newline at the end
\z end of string
\G matching start position |