Try this for "0 or more of anything as long as there is on " or ' in there ": .*(\'|\").* It's off the top of my head... but what it basically is saying is this: any or no amount of whatever followed by either an ' or " followed by any or no amount of whatever That might work. (sorry, don't have time to test it) The thing to keep in mind, though, is the way of thinking about the problem. Regular expressions are tough for a lot of people because they do require a new mindset. Once you get into the mindset, they become a lot easier, but it does take some getting used to. Much like trying to take an Algebra class and being sick the day they define the = sign. Until somebody fills you in, your basically hurting. -joshua ----- Original Message ----- From: "Steve Cook" <sck at biljettpoolen.se> To: <thelist at lists.evolt.org> Sent: Friday, January 05, 2001 4:16 AM Subject: RE: [thelist] regular problems > [^\'\"]* - the ^ mark normally denotes "At the beginning of the string". In > square brackets, it denotes "Match any character EXCEPT these in the list". > > If you want to match any string that contains " or ' then you can probably > just use [\"\'] - as for how you would check for no even amount, I'm not too > sure. > > I assume also you are using the Posix regular expressions that are supported > in the base PHP "ereg" function. > > Here's an excellent guide to Regular Expressions - I hope it helps. > > http://www.contactor.se/~dast/mail2sms/regex.shtml > > steve > > > > > -----Original Message----- > > From: Peter Van Dijck [mailto:peter at vardus.com] > > Sent: den 5 januari 2001 12:34 > > To: thelist at lists.evolt.org > > Subject: [thelist] regular problems > > > > > > Hi, > > I'm trying to get (in PHP) > > > > 0 or more of anything as long as there is on " or ' in there > > or even better > > 0 or more of anything as long as there is no even amount of > > " or ' in there > > > > Help! it's y first day at regular expressions, it's hard. I had > > [^\'\"]* > > but it doesn't work! > > Peter > > > > > > --------------------------------------- > > For unsubscribe and other options, including > > the Tip Harvester and archive of TheList go to: > > http://lists.evolt.org Workers of the Web, evolt ! > > > > --------------------------------------- > For unsubscribe and other options, including > the Tip Harvester and archive of TheList go to: > http://lists.evolt.org Workers of the Web, evolt !