Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2198

Re: regex puzzle

Received by 10.66.86.98 with SMTP id o2mr9119867paz.29.1351547308438; Mon, 29 Oct 2012 14:48:28 -0700 (PDT)
Received by 10.68.252.74 with SMTP id zq10mr722644pbc.5.1351547308372; Mon, 29 Oct 2012 14:48:28 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!kr7no25321933pbb.0!news-out.google.com!s9ni66624pbb.0!nntp.google.com!kr7no25321925pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.help
Date Mon, 29 Oct 2012 14:48:28 -0700 (PDT)
In-Reply-To <olqt88d9p21pf9nau0j4pke7kmhq08u5o4@4ax.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
NNTP-Posting-Host 69.28.149.29
References <olqt88d9p21pf9nau0j4pke7kmhq08u5o4@4ax.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <f7a2eec3-eca9-468a-8d8a-3d8bf360a530@googlegroups.com> (permalink)
Subject Re: regex puzzle
From Lew <lewbloch@gmail.com>
Injection-Date Mon, 29 Oct 2012 21:48:28 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.java.help:2198

Show key headers only | View raw


Roedy Green wrote:
> Lets say you wanted to find strings of the form
>  &quot;cat&quot;

Do you mean 

   "cat"

including the quotation marks?

>  &quot;na&iuml;ve&quot;

Do you mean 

   "naïve"

including the quotation marks?

Or do you mean to literally find the escape characters, &quot;, e.g., as an HTML 
parser might?

> What sort of regex would you use?  or would you resort to custom code?

Are you trying to find all substrings either "cat" or "naïve", or just one or the other 
for any given search?

Or does "of the form" mean something else?

If you're looking for ways to parse HTML escape characters, you could just look for the 
'&' character then match against a table such as the one on 
http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php

-- 
Lew

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2012-10-29 13:46 -0700
  Re: regex puzzle Lew <lewbloch@gmail.com> - 2012-10-29 14:48 -0700
    Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2012-10-30 05:59 -0700
      Re: regex puzzle "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2012-10-30 14:48 +0100
        Re: regex puzzle markspace <-@.> - 2012-10-30 14:16 -0700
          Re: regex puzzle "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2012-10-31 09:54 +0100
            Re: regex puzzle markspace <-@.> - 2012-10-31 11:25 -0700
              Re: regex puzzle "Peter J. Holzer" <hjp-usenet2@hjp.at> - 2012-11-01 13:56 +0100
                Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2012-11-01 18:46 -0700
          Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2012-10-31 07:09 -0700
        Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2012-10-31 07:11 -0700
          Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2012-10-31 16:22 -0700
            Re: regex puzzle markspace <-@.> - 2012-10-31 17:29 -0700
              Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2012-11-01 18:43 -0700
  Re: regex puzzle Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-10-30 16:39 -0700
    Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2012-10-31 07:33 -0700

csiph-web