in reply to Regex help

If you're only going to be doing a small number of searches on a short string, you can use the i flag for everything without significantly slowing your program. If you're going to be doing a large number of searches and/or the string to be searched is very long, you're better off making a copy and upper or lowercasing everything so you don't have to use i at all.

Either way, I wouldn't come at the problem from this direction.

Replies are listed 'Best First'.
Re^2: Regex help
by kiat (Vicar) on Apr 25, 2005 at 01:29 UTC
    I'm doing a quiz thing. I need the answers to be case-sensitive for some questions and case-insensitive for others.