On 30/7/2006, at 1:13, cormullion@mac.com wrote:
Definitely! And I've got to work out how to match any number of arguments, each of which can contain any character except " ' ( ) : , and space, but mustn't start with # ; " ' ( ) { } . , 0 1 2 3 4 5 6 7 8 9. I'll have to go back to regexp school, i think. :-)
Something like: (?![#;"'(){}.,0-9])[^"'(): ]+
First a negative look-ahead on what you can’t match (so only applies to first char,) and then the characters valid in an argument (using a negative character class.)
You need to escape one set of the quotes when using it in the language grammar (where ' is escaped by using ''.)