in reply to Matching non-words
As I understand your question, the thing between() can be an email address. And in that case, you want to trigger something. If I am completely wrong, well, I 'll need a coffee.
You can use Email::Valid to check the contents between the braces and trigger it it is true, f.e.
I hope this helps,use strict; use Email::Valid; my $subject="Subject: You've Won a Million Dollars!!!(xstebxz)" if ( $subject =~ /(\(.*\))$/ ) { if ( Email::Valid->address( -address => $1, -mxcheck => 0, )) { print "Subject contains email address"; } }
|
|---|