Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: regexp(ing) Backus-Naurish expressions ... Date: Mon, 11 Mar 2013 21:03:11 +0100 Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net ucqNGGmdcfLatXf5ANK9CwphRBYsewqlpdcpXiYOc4SatmiWDt8lui9AviKnIU9/Q= Cancel-Lock: sha1:GNS5jy4WYKLtCheJlMGjx1o04j4= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: X-Antivirus: avast! (VPS 130311-0, 11.03.2013), Outbound message X-Antivirus-Status: Clean Xref: csiph.com comp.lang.java.programmer:22892 On 10.03.2013 23:54, Roedy Green wrote: > Examples where regexes run out of steam: I never said you can do anything with regexps. You said they are "quite limited" to which I responded "I beg to differ: it's amazing what you can do with them." I think you are talking completely past me. > parsing Java, HTML, BAT language ... to do syntax colouring. For that you need a context free parser anyway and would not create a FSM by hand. > screen scraping, where what you want can appear in arbiter orders, be > missing, or enclosed in a variety of delimiters. Still, I haven't seen a single reason to create a FSM by hand. > creating code to simulate the output of forms. You have to do it in > stages. You pick out a string then you pick out strings of that Regexps are for _parsing_ and not for _generating_. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/