Nick <nboutelier(at)gmail(dot)com> wrote:
> SELECT TRUE WHERE '/steps/?step=10' ~ '^\/steps\/\?step=10$'
> Im guessing its an escape issue, but where am I going wrong?
You need to double-escape the question mark: Once for the
string literal, once for the regular expression (and you do
not need to escape the slashes). This gives:
| tim=# SELECT TRUE WHERE '/steps/?step=10' ~ E'^/steps/\\?step=10$';
| bool
| ------
| t
| (1 Zeile)
| tim=#
Tim