It will match. I just posted code that proves that. But your correct, it works fine without the // delimiters.
Are you using chomp() on the user input before using it in the regexp?
Kevin, I appreciate your post, but it turns out that the whole problem was my oversite the whole time. I still don't totally understand WHY it wouldn't match, gotta think through that a bit more, but let me try to briefly explain.
The $user_input is a search request from the user (web based) to search a database of financial transactions. In the instance of a check transaction, the data is stored as "Check 1234" indicating both the transaction type and the check number. So when the user inputs a check number ($user_input) of say "8", it searches the data file in that column of data for "8" against the actual data which is "Check 1008" or "Check 1800". Follow? I WAS altering the user data to reflect, in our example, "Check 8" instead of just "8". It was a simple fix, just removed the line that modifies the $user_input variable and now it matches "8" ($user_input) against the data string "Check 1234", and voila! It matches properly. Again, I am not entirely sure why "Check 8" from user input when matched against "Check 800" returns true, but when matched against "Check 1800" returns false.
I hope this hasn't been entirely confusing, and if you understand what I am describing here at all, I would like to hear your insight on this. Long story short, it's fixed now! Thanks!
Derek