Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!aioe.org!.POSTED!not-for-mail From: Roedy Green Newsgroups: comp.lang.java.programmer Subject: Re: regex capability Date: Mon, 04 Apr 2011 00:50:34 -0700 Organization: Canadian Mind Products Lines: 19 Message-ID: References: Reply-To: Roedy Green NNTP-Posting-Host: RCd/Ul4tyxGUBII8WGwa5g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2839 On Mon, 04 Apr 2011 02:34:30 -0500, Leif Roar Moldskred wrote, quoted or indirectly quoted someone who said : > >Easiest is to just use split. You can always do a regex of the type >"(\\d+)/((\\d+)/)?((\\d+)/)?((\\d+)/)?" but that's just pointlessly >complicated. There's no reason why you should use a regex when "normal" >string parsing is simpler and easier to read. (xxx|yyy)+ seems to generate only one group item, no matter how many repetitions there are. That strikes me as a bug, but likely someone can explain why it is a feature or inevitability. -- Roedy Green Canadian Mind Products http://mindprod.com Doing what the user expects with respect to navigation is absurdly important for user satisfaction. ~ anonymous Google Android developer