REGEXP syntax

2001-07-27 Thread Mark Worsdall
Hi, Trying to get to grips with regexp but really want to 1st get a simple expression working with mysql. SELECT Sequence, Message, id FROM $sqlTable WHERE Sequence REGEXP(\^$filterValue;\) The above works for finding matched values, where the number = to $filterValue is in in the 1st part.

Re: REGEXP syntax

2001-07-27 Thread tj marlin
Mark: the key to this puzzle is the separator, the ';' for your first question, you need to find the ';' followed by a 6. not just any ';', but the first ';' the pattern would be ^[0-9]*;6 which says ^ find beginning of line [0-9]* followed by zero or more instances