- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
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.
Aeroplane LIKE 767 | Movie LIKE 'Star' AND NOT Movie LIKE 'Trek' | Number IN (1,2,3,4,5)
Hello there | A=EXCELLENT OR | B!=POOR
Author Rating: Not yet rated. Joseph Warwick
Your Rating
Bad Good

Enter New Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: begin and end blocks
Name: Joseph Warwick
Date: 9/12/2005 7:45:07 AM
You capture from beginning to end of a text string you can use ^(^$)*

Title: Goes well
Name: V.C.Sekhar
Date: 10/16/2004 12:37:48 AM
Hi Joseph, your expression worked fine with my stored procs. Nice to see this. I am in the making of a regular-expression based T-SQL parser. Just to check with you whether I can request some info from you regarding few expressions. I tried to capture the text between begin and end blocks using ^begin(.\n)*end$ , but failed miserably. Thanks in advance, Sekhar vcsekhar007 at

Title: Comma Separated Quoted Lists
Name: Dave W
Date: 12/11/2003 5:17:06 PM
Does this do the job in terms of matching a single quoted string spearated commas(".*?",)

Title: More details
Name: James F.
Date: 10/8/2003 6:59:07 PM
I don't have excellent knowledge of SQL queries, but what charaters are allowed within quotes (if they are to be restricted)? Anyway, you would replace your sub-mask: |'([^']*)'| by this one: |('([^']*)')(,\s*'([^']*)')*|

Copyright © 2001-2018, | ASP.NET Tutorials