in reply to Parse for a Single bit
The character class is not the problem, it's that all lines have a variable name, equals, prime and either 0 or 1. But you want the line to end there; if you don't make that explicit, the regexp matches and the remainder of the line is ignored. So you have to use /(.*?)=\'[01]$/
Edit: as davido beat me to it: yes, (\w+) makes much more sense than (.*) as empty identifiers (or those of weird characters ... although I vaguely remember some HDLs can use petty uncommon chars in wire names, right?) are certainly an error.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parse for a Single bit
by davido (Cardinal) on Jan 27, 2012 at 22:41 UTC |