Negating a match based on preceding character

Afraits

Regular
Joined
Jan 28, 2005
Messages
73
Location
Manchester, UK
I have a regular expression to aid me in extracting information from a file:
(ALPHA|NUMERIC|DATE)\s+(\w+)\s+
Which extracts a type descriptor and the variable name into the cature groups.
However a textline may have one or more ';' characters followed by (and/or preceeded by) whitespace which acts as a comment and hence in these cases I would like the expression not to match. Is there a way to do this without performing a seperate extra check for a ';' preceeding the part I want?
 
Back
Top