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.
In reply to Re: Perl and PostgreSQL regex
by erix
in thread Perl and PostgreSQL regex
by chrishowe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |