House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / Regular Expressions (RegEx)

Regex for DDL

Author:
Peter Boughton
11/05/2010 11:58 AM

> I did try both of your suggestions, but RS threw the following error in > both cases: > > "lookbehind assertion is not fixed length" > > Any idea what that means? Ah yeah, that's an annoying restriction many regex implementations have - they don't allow the lookbehind to match a variable length of characters (or some allow variable length, but must have a maximum length). I did "(?<=CREATE\s+TABLE\s+)" to allow for multiple spaces and/or tabs, newlines, etc at where the "\s+" appear there. The simple fix is to change "\s+" to just " " (space), but that of course only matches a single space (might be good enough, depending on input text). You could also try "\s{1,99}" to allow upto 99 whitespace characters, but I suspect the message would have said "maximum length" instead of "fixed length" if that were allowed.


Search regex

November 27, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
             1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30             

Designer, Developer and mobile workflow conference