Regular Expressions and Pattern Matching
Previous Microplanet Gravity Next |
Gravity uses Perl Compatible Regular Expressions (PCREs). Version 4.4, 21 August, 2003, Copyright (c) 1997-2003 University of Cambridge
" This is a library of functions to support regular expressions whose syntax and semantics are as close as possible to those of the Perl 5 language . "
ü You must remember to check the Regular Expression box where applicable, or Gravity will treat the expression as plain text (this is a common error).
Gravity's PCREs are NOT case sensitive by default. To use case sensitive matching, use the " i " PCRE internal option in the expression like this:
(?-i)
There are numerous PCRE tutorials on the web. Keep in mind, when reading PCRE technical manuals or tutorials, that Gravity is compiled with the caseless setting. Therefore, (?-i) technically un-sets the caseless setting, and (?i) resets it - confused yet? · In other manuals (?-i) may turn case sensitivity OFF instead on ON, depending on the caseless compile option. With Gravity (?-i) always sets case sensitivity.
If you want a popup window of the simple and most common PCRE operators that you can keep open, use the following:
Open the PCRE Popup
For the technical folks who need the gory details, here are the unedited 2003 Manual Pages.
2003 PCRE Manual pages