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


Groups > comp.lang.java.programmer > #22196

Re: regex reserved chars

X-Received by 10.180.19.132 with SMTP id f4mr451446wie.2.1360240707575; Thu, 07 Feb 2013 04:38:27 -0800 (PST)
X-Received by 10.49.63.164 with SMTP id h4mr60584qes.39.1360240706893; Thu, 07 Feb 2013 04:38:26 -0800 (PST)
Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.unit0.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.85.212.216.MISMATCH!19no11259591wij.1!news-out.google.com!i11ni39875wiw.0!nntp.google.com!yu2no12480023wib.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Thu, 7 Feb 2013 04:38:26 -0800 (PST)
In-Reply-To <epk6h8plvg3sbcnvnr43q6e99p9q8t8n66@4ax.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=80.66.20.180; posting-account=MGO7qgoAAABvyo26eHVDO00044spH-ws
NNTP-Posting-Host 80.66.20.180
References <42t5h8d8ta5iq9nkfded0pvfl104cqhc77@4ax.com> <epk6h8plvg3sbcnvnr43q6e99p9q8t8n66@4ax.com>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <e76ff74b-8d86-4457-a6fc-e458ab5c485b@googlegroups.com> (permalink)
Subject Re: regex reserved chars
From Robert Klemme <shortcutter@googlemail.com>
Cc Roedy Green <see_website@mindprod.com.invalid>
Injection-Date Thu, 07 Feb 2013 12:38:27 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.programmer:22196

Show key headers only | View raw


On Thursday, February 7, 2013 8:31:47 AM UTC+1, Roedy Green wrote:
> On Wed, 06 Feb 2013 16:28:29 -0800, Roedy Green
> 
> <see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
> someone who said :
> 
> >ve always treated $ ( ) * + -. ? [ \ ] ^ { | }
> >as reserved regex chars.
> >I can't find any docs that say the list is different inside[  ].
> 
> I have not found an official source however it is claimed only [ - ^]
> are reserved in character classes i.e inside [...]

Is http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html not official enough?  Or are you missing an more explicit explanation on that page?

> I don't think that can be right.

Roedy, why???

>  Surely $ is reserved too, and of course \.

Dot has no special meaning and neither does $.  Btw. you can easily test that.  Apart from that dot with special meaning does not make sense in a character class if you think about it for a moment.

Cheers

robert

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


Thread

regex reserved chars Roedy Green <see_website@mindprod.com.invalid> - 2013-02-06 16:28 -0800
  Re: regex reserved chars markspace <markspace@nospam.nospam> - 2013-02-06 16:54 -0800
    Re: regex reserved chars Lew <lewbloch@gmail.com> - 2013-02-06 18:03 -0800
      Re: regex reserved chars markspace <markspace@nospam.nospam> - 2013-02-06 18:10 -0800
        Re: regex reserved chars Roedy Green <see_website@mindprod.com.invalid> - 2013-02-06 22:50 -0800
          Re: regex reserved chars markspace <markspace@nospam.nospam> - 2013-02-07 09:32 -0800
            Re: regex reserved chars Gene Wirchenko <genew@telus.net> - 2013-02-07 10:51 -0800
              Re: regex reserved chars markspace <markspace@nospam.nospam> - 2013-02-07 11:53 -0800
              Re: regex reserved chars Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 20:25 -0500
              Re: regex reserved chars Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 20:32 -0500
          Re: regex reserved chars Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 20:17 -0500
      Re: regex reserved chars Roedy Green <see_website@mindprod.com.invalid> - 2013-02-06 23:06 -0800
        Re: regex reserved chars Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 20:15 -0500
          Re: regex reserved chars Lew <lewbloch@gmail.com> - 2013-02-09 10:43 -0800
  Re: regex reserved chars Arne Vajhøj <arne@vajhoej.dk> - 2013-02-06 20:18 -0500
    Re: regex reserved chars Martin Gregorie <martin@address-in-sig.invalid> - 2013-02-07 21:17 +0000
      Re: regex reserved chars Jim Janney <jjanney@shell.xmission.com> - 2013-02-07 20:47 -0700
        Re: regex reserved chars Martin Gregorie <martin@address-in-sig.invalid> - 2013-02-09 00:50 +0000
      Re: regex reserved chars Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 20:06 -0500
        Re: regex reserved chars markspace <markspace@nospam.nospam> - 2013-02-08 19:02 -0800
          Re: regex reserved chars Nigel Wade <nmw@ion.le.ac.uk> - 2013-02-11 09:25 +0000
            Re: regex reserved chars markspace <markspace@nospam.nospam> - 2013-02-11 07:16 -0800
              Re: regex reserved chars Nigel Wade <nmw@ion.le.ac.uk> - 2013-02-11 17:12 +0000
  Re: regex reserved chars Roedy Green <see_website@mindprod.com.invalid> - 2013-02-06 23:31 -0800
    Re: regex reserved chars Robert Klemme <shortcutter@googlemail.com> - 2013-02-07 04:38 -0800
    Re: regex reserved chars Arne Vajhøj <arne@vajhoej.dk> - 2013-02-08 20:02 -0500

csiph-web