was jus playing with some code i need to manipulate email address, this is just the beginning part. I need once the email is entered a switch is also used. U means upper case. WC means for all the . to be changed to / dot / and the @ changed to / at /.
The next switch is wc and does the reverse of the WC switch. This doesnt seem to work at all. and its buggin me.
I haven't tested but this should work. You should stop using regex to check for a static string (the regex were validating something like "UUUGGAFAGSH" as if it was "U"...)
Some of the code works fine, the bit that doesnt work is if the $email is for example 'x dot x at hotmail dot com', the wc switch does not seem to be changing the email to 'x.x@hotmail.com', cant seem to put my finger on the problem.
My initail thought is the space in the regex, becase when entering U as a switch and the $email is 'x dot x at hot.......' the result is just a 'X'