is this a regexp bug?

is this a regexp bug?

am 13.04.2005 01:36:51 von Brady Brown

I didn't see a mention of this in the archives. It seems I cannot escape
a '?' in the match string, e.g.,

mysql> select 'list.php?e=source&other=stuff' regexp 'list.php\?e=source';
+----------------------------------------------------------- --+
| 'list.php?e=source&other=stuff' regexp 'list.php\?e=source' |
+----------------------------------------------------------- --+
| 0 |
+----------------------------------------------------------- --+

-b

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

RE: is this a regexp bug?

am 13.04.2005 03:03:52 von Tom Crimmins

On Tuesday, April 12, 2005 6:37 PM, Brady Brown wrote:

> I didn't see a mention of this in the archives. It seems I cannot
> escape a '?' in the match string, e.g.,
>
> mysql> select 'list.php?e=source&other=stuff' regexp
> mysql> 'list.php\?e=source';
> +----------------------------------------------------------- --+
>> 'list.php?e=source&other=stuff' regexp 'list.php\?e=source' |
> +----------------------------------------------------------- --+
>> 0 |
> +----------------------------------------------------------- --+
>
> -b

Try:

select 'list.php?e=source&other=stuff' regexp 'list.php\\?e=source';

The first backslash gets striped by the parser.

Please refer the to the following:
http://dev.mysql.com/doc/mysql/en/regexp.html

--
Tom Crimmins
Interface Specialist
Pottawattamie County, Iowa

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org