Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #28012
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | markspace <markspace@nospam.nospam> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: regex puzzle |
| Date | Wed, 09 Apr 2014 19:07:30 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 15 |
| Message-ID | <li4ud5$phh$1@dont-email.me> (permalink) |
| References | <n0kbk99fhl1se3phk8o9d6t6j3t3jkahs2@4ax.com> <li4k28$us1$1@dont-email.me> <re-20140410025142@ram.dialup.fu-berlin.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Thu, 10 Apr 2014 02:07:34 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="9358cda03e1e0dfd3c4b757daa608707"; logging-data="26161"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YciwvArPRwmP+NpvaRHC3b1KqeB6Hs+U=" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
| In-Reply-To | <re-20140410025142@ram.dialup.fu-berlin.de> |
| Cancel-Lock | sha1:RR+F9ZbX89RAhJsv96w5KnAPoZ8= |
| Xref | csiph.com comp.lang.java.programmer:28012 |
Show key headers only | View raw
On 4/9/2014 5:52 PM, Stefan Ram wrote:
> { final java.lang.String r = "[1-9]|1[0-9]|20";
This is the type of solution I'm used to seeing for problems of this
type. Roedy said he didn't want to match substrings (so "2009" should
not be matched. I think you just have to add some "not digit" to the
outside of that.
"\\D([1-9]|1[0-9]|20)\\D"
Not tested.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2014-04-09 15:57 -0700
Re: regex puzzle Knute Johnson <eternal@knutejohnson.com> - 2014-04-09 16:11 -0700
Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2014-04-09 16:14 -0700
Re: regex puzzle Roedy Green <see_website@mindprod.com.invalid> - 2014-04-09 16:24 -0700
Re: regex puzzle Knute Johnson <eternal@knutejohnson.com> - 2014-04-09 18:24 -0700
Re: regex puzzle Arne Vajhøj <arne@vajhoej.dk> - 2014-04-11 21:06 -0400
Re: regex puzzle markspace <markspace@nospam.nospam> - 2014-04-09 19:07 -0700
Re: regex puzzle Robert Klemme <shortcutter@googlemail.com> - 2014-04-11 01:56 -0700
csiph-web