Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: simple regex pattern sought Date: Fri, 25 May 2012 14:55:07 -0700 (PDT) Organization: http://groups.google.com Lines: 18 Message-ID: References: NNTP-Posting-Host: 69.28.149.29 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1337982907 26544 127.0.0.1 (25 May 2012 21:55:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 25 May 2012 21:55:07 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T User-Agent: G2/1.0 X-Received-Bytes: 1346 Xref: csiph.com comp.lang.java.programmer:14801 Roedy Green wrote: > I often have to search for things of the form > > "xxxxx" > or > 'xxxxx' > > where xxx is anything not " or '. It might be Russian or English or > any other language. > > What is the cleanest way to do that? Use a regex like "[\"'][^\"']+[\"']" is one way. The cleanest? I don't know. -- Lew