Assuming your input string is 'Michael please look at E123456', your regular expression expects a trailing space that is not there. Rather than looking for trailing white space, perhaps you'd like the non-whitespace character class \S (m/$mystring2\s*(\S*)/i)? See Using character classes.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re: Regex, query
by kennethk
in thread Regex, query
by dmsparts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |