From: Yaser Sulaiman Date: 2009-01-25T17:49:59+09:00 Subject: Re: regural expression with not condition. --001636c5a66f11c0d104614abb48 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Sat, Jan 24, 2009 at 11:05 PM, Vamsi Krishna < vamsikrishna.naidu@gmail.com> wrote: > Hi all, > > i'm trying validate the format which doesn't consist of an empty string > in the single or double quotes. > Hi. How about /^['"](.+)['"]$/. It will match a single or double quotation mark at the start of the line, followed by one or more of any character, followed by a single or double quotation mark at the end of the line. Please note that it will match things like "'" (a single quotation mark inside double quotes) and ''' (a single quotation mark inside single quotes). You might want to handle such cases or come up with a better regexp. BTW, Rubular[1] is a great tool for editing and testing regular expressions. Regards, Yaser [1]: http://www.rubular.com/ --001636c5a66f11c0d104614abb48--