perlquestion
AI Cowboy
<code>
$text = 'pilar@delphoss.com type add (#090930-230011-907000 ur22122021 pi';
$text =~ s/.*\s(\w+)@(\w+)\.com .*/$1@$2\.(\w+)/;
</code>
<p></p>
Say, for instance, this were to happen (a variable has a weird-ass value, and you try to parse an email address out of it). Why isn't the regex extracting the email address from this string? I can't find it out.
<p>EDIT: By the by, this code fragment is not what is used. The regex is used, but the variable is initialized through a large process in my code that I can't really release on here.</p>
<p>EDIT 2: Thanks to some of the help on this thread, I was able to get the proper regex, <code>$text =~ /(\w+)@(\w+)\.com/;</code>. Thanks to everyone for trying to help :)</p>