Name: Anonymous 2010-09-13 6:49
I am fairly new to perl and even newer to regular expressions, so if you can improve on this at all go on ahead. However, that isn't really why I came here. Basically, I want it to return true if the word(s) after "going/gonna (to)" equal either bed, sleep, nap or rest. I can't get it to work and whenever it comes close to working, it just returns true for any following word, which is not what I want.
I have this:
Any help is appreciate and again, if you can improve this at all, please do.
I have this:
if($arg =~ /^I( am|'m)? go[naing]?([ to]*) /i)
{
# some code here
}Any help is appreciate and again, if you can improve this at all, please do.