I have been trying to parse a HDL file that has a format as below
a='0 b='001 c='110 d='1
Expected Output: a d
Code:while<> {chomp; if(~/(.*?)=\'[0|1]/) #if(~/(.*?)=\'[0-1]/) #if(~/(.*?)=\'[01]/) { print $1; } }
Actual Output: a b c d
I tried the commented 'if' statements, individually. Seem to be getting the same output. Any suggestion would help. Thanks.In reply to Parse for a Single bit by HJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |