Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Daniele Futtorovic Newsgroups: comp.lang.java.programmer Subject: Re: regex replaceAll? Date: Thu, 1 Mar 2018 21:40:38 +0100 Organization: A noiseless patient Spider Lines: 9 Message-ID: References: <4a800440-39fe-4684-8369-e6a4e6b9d79f@googlegroups.com> <66e1310d-f709-4501-ba68-467e7c424392@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Date: Thu, 1 Mar 2018 20:40:47 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="1baef884b5bb9d3643422d367ccb23e9"; logging-data="17282"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1G08TR0LB3YRBRpv5WD52" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: <66e1310d-f709-4501-ba68-467e7c424392@googlegroups.com> X-Antivirus-Status: Clean Content-Language: en-GB X-Antivirus: AVG (VPS 180228-6, 02/28/2018), Outbound message Cancel-Lock: sha1:p2wbmrrQfy0ITkDiVoDfj4MAaG0= Xref: csiph.com comp.lang.java.programmer:38092 On 2018-03-01 21:28, Eric Douglas wrote: > I could easily write a search/replace loop method. I've been trying to figure out how to do it with a single method, as in the replaceAll, or possibly a lamba?, but I did get the replaceAll that somehow seems to work for blank spaces. You could also set yourself the goal of writing it in ASM. Not sure that would get you anywhere fast, either. > One area I'd like to use that is to line format a collection display. The toString lists the elements comma delimited. Stream#collect( Collectors.joining(...) )