Afraits
Well-known member
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?
(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?