Never though it would be this hard to do a simple match even after searching google.
I'm trying to do this:
$string = "sdf #123456 something something else test testing"
I want to look for the occurrence of pound sign somewhere in a string, immediately followed by exactly 6 numbers, immediately followed by a white space. I want the digit in between the pound and the white space in some variable $num.
Every time I make an attempt at the regex, it keeps commenting out the # in the IDE (using a program called Perl Express). I assume I'm not doing it right. Here's my messed up attempt:
$string =~ m/\#(\d{6})\s/;
$num = $1;
What am I doing wrong here? Thanks in advance.