note
live4tech
<p><b>Thanks for this, it lead to the answer!</b></p>
The one-liner worked for me as well and so I went back to my code (which I should have posted) and realized I forgot to chomp the input strings (the user was prompted to enter input strings and a regex). I chomped the regex, not the input strings. A novice mistake, I apologize!
1017070
1017073