hi Allan, thanks, it works like a charm! (It all makes sense when you explain it to a regex newbie... :)
I guess I'll have to save this variant somehow so it doesn't get overwritten by future SQL bundles... Hopefully I can figure that out on my own. Paul
On 27 Jan 2005, at 14:17, Allan Odgaard wrote:
`user` varchar(20) collate utf8_bin default NULL, [...]
I wanted to offset the collate and CHARSET content so I cut-and-paste within the SQL bundle to create the following:
<string>^\s*\w+\s+(collate|utf8_bin|DEFAULT|CHARSET|utf8|COLLATE)\s*< /string>
This is matching: begin of line optional whitespace one or more word characters one or more whitespace characters one of your various elements
The problem is that your text is not only having one sequence of word-characters in front of the element names, it has “`user` varchar(20)”. I'd think that you can just delete the entire “^\s*\w+\s+” sequence (and also the trailing “\s*”).