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: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: Re: regex puzzle Date: Wed, 09 Apr 2014 16:11:04 -0700 Organization: A noiseless patient Spider Lines: 17 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 9 Apr 2014 23:11:04 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="aba33539224e5c782fe0c4053f7756fd"; logging-data="31617"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184nQhdMXq4ZL/zIaYEFDF/" User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Cancel-Lock: sha1:tJfAZ69dOe+nKiSSlLjHJ3vlvP8= Xref: csiph.com comp.lang.java.programmer:28006 On 4/9/2014 15:57, Roedy Green wrote: > Is there a way within a regex to find strings of the from: > > 1 .. 20? > > For reasons hard to explain I don't want to capture then check outside > the regex. > So does 1 .. 20 mean 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 or 1 .. 20? 1 .. 20 ^\d+ \.\. \d+$ -- Knute Johnson