in reply to Perl and PostgreSQL regex
Using bracket expressions to prevent ' leaning toothpick syndrome' (= the \\\\\\ misery) might be useful, and embedded (?x) lets you add comments to a regex, like so:
select 'word.01234' ~ E'(?x) ^ # begin-of-string word # root word [.] # dot [[:digit:]]+ # digits... $ # end-of-string ' ; -- caveat: -- the (?x) option overrides any previously determined -- options including RE flavor and case sensitivity.
tilly is right regarding placeholdering, of course - see also dbi, placeholder and postgres regular expression problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl and PostgreSQL regex
by chrishowe (Acolyte) on Mar 04, 2009 at 14:12 UTC |