RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
(NOT)?(\s*\(*)\s*(\w+)\s*(=|<>|<|>|LIKE|IN)\s*(\(([^\)]*)\)|'([^']*)'|(-?\d*\.?\d+))(\s*\)*\s*)(AND|OR)?
Description
Heres my sql clause parser regexp for recordset filtering. Does recursive query parsing all by its self. Only problem I cant figure is how to match comma separated lists of quoted strings. Tell me if you figure out how! The unicodes in the re was put in by the entry form please replace them with their ascii equivalents to use it.
Matches
Aeroplane LIKE 767 | Movie LIKE 'Star' AND NOT Movie LIKE 'Trek' | Number IN (1,2,3,4,5)
Non-Matches
Hello there | A=EXCELLENT OR | B!=POOR
Author Rating: Not yet rated. Joseph Warwick
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials