in reply to Re^2: word with some number in between
in thread word with some number in between
" ... what i tried doing is that some $ before num and some $ after it "
Do you, by any chance, mean you tried to deal with data that included a "$" sign... such as: abc12$ or $98abc or $$zyx5abc or something similar?
If so, you'll have to escape the "$" sign (with a preceding backslash, "\") in your regex.
perl -E "my $s='$abc123'; if ($s =~ /\$/ ) { say 'Found a dollar-sign';}which outputs:
Found a dollar-signOtherwise, (slightly oversimplified), the regex engine uses the "$" sign is only to mark an EOL.
Updated by quoting a possibly mis-understood part of OP's latest question.
|
|---|