in reply to Re^2: string selection from a character class
in thread string selection from a character class
Your solution is exactly the solution I also am using to overcome and it works enough for me.
Before my very first posting I was doing (in a loop):
But in this way, for $word="0", pattern was not matched so previous loop's $1 and $2 was printed. And program functioned incorrectly.$word =~ /^(\d)\st=(\S+)/; next if ($1 == 0); print "$2\n";
Anyway, now I am doing:
and it works ok for my task.next if(!($word =~ /(\d)\st=(\S+)/)); print "$2\n";
I thank you for your replies.
|
|---|