I want to search text strings to see if they start with a day of the week (Monday or Tuesday or Wednesday, etc.)
Among other things, I've tried ^(Monday)*(Tuesday)*(Wednesday)...... but the problem is how to end it. Or, perhaps I just need a different approach.
Would it actually be a better idea to put the days of the week in an array and loop throught the array to see if any of the elements match the first word of the string?
Thanks!
Mike Wilkinson
Regular Expression to Find Day of Week
Moderator: General Moderators
Regular Expression
^(Monday|Tuesday|Wednesday|Thurday|Friday|Saturday|Sunday)$
I think that's it... If you want to learn more about Regular Expression check this out:-
http://www.phpbuilder.com/columns/dario19990616.php3
I think that's it... If you want to learn more about Regular Expression check this out:-
http://www.phpbuilder.com/columns/dario19990616.php3
Thanks for the tips!
Thanks for the tips.
For some reason my reference did not have any info on the OR function, so I didn't know that it was available.
Mike Wilkinson
For some reason my reference did not have any info on the OR function, so I didn't know that it was available.
Mike Wilkinson