Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: BGB Newsgroups: comp.lang.java.programmer Subject: Re: multi-line Strings Date: Sun, 16 Dec 2012 02:56:00 -0600 Organization: albasani.net Lines: 53 Message-ID: References: <7f36342c-2331-4484-874b-4a0f8953f160@googlegroups.com> <50c61150$0$293$14726298@news.sunsite.dk> <50c6413a$0$293$14726298@news.sunsite.dk> <50c6598d$0$290$14726298@news.sunsite.dk> <50c69625$0$293$14726298@news.sunsite.dk> <50cbeec3$0$291$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.albasani.net VJhJhaXFb8e9temYSTLEXbES/HoO+Zj3re0yJYRui5f/l7nCVEJEXPFM+FFRczU0w49SDYXmpAWZOuhZA9NWtg== NNTP-Posting-Date: Sun, 16 Dec 2012 08:58:42 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="HJ5CN7EMuI+W9TN6bLE34KEsYYRcPPB8JuExgD/1PQg3PaiVOsRQQKYUqVO8XIzs55P9QFcE0mJJAT7EsNgNiOY1gkb2kyARG6mP8I2d/6XXlZAehNhnn2uNBwgSss9x"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 In-Reply-To: Cancel-Lock: sha1:a8Dab5GdYgyhoG+kqiq0bbaSNJk= Xref: csiph.com comp.lang.java.programmer:20372 On 12/15/2012 5:34 PM, Robert Klemme wrote: > On 15.12.2012 18:22, Peter J. Holzer wrote: >> On 2012-12-15 03:30, Arne Vajhøj wrote: >>> On 12/11/2012 5:31 PM, Martin Gregorie wrote: >>>> Its just a bit frustrating that there are languages around that can >>>> deal >>>> with regexes without turning them into an unreadable mess and that Java >>>> isn't one of them. >>> >>> The regex syntax itself is not exactly a good example of readability. >> >> True, but there are ways to improve it. For example, Perl has a variant >> Regexp syntax (indicated with the /x flag) where whitespace (including >> newlines) is ignored and comments are allowed. > > http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#COMMENTS > > >> But for all various string syntaxes that Perl supports, it's still >> missing a sane multiline string syntax. > > Does it? > > $ perl x.pl > a line > another line > yet another line > one more line > $ cat x.pl > > $str=< a line > another line > yet another line > one more line > MULTI > > print($str); > I had before imagined the possibility of something like: #<