Regular Expression to Find Day of Week
Posted: Sun Aug 11, 2002 12:31 am
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
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