Except that there is nothing like =~ s in haskell, as far as I can tell.

I was mulling over this and thinking, the nicest solution for this --
from the lens of perl evangelism anyway -- would be to have some way
of accessing the perl6 language =~ s mechanism in pugs, which would
get us everything in perl 5 =~, and also all the cool grammar stuff
that comes in perl6, which seems 90% of the way to parsec in terms of
power but with a thought out huffman-optimized syntax.

Accordingly I am trying to load pugs in ghci, about which more at

http://perlmonks.org/?node_id=750768

2009/3/14 Brandon S. Allbery KF8NH <allb...@ece.cmu.edu>:
> On 2009 Mar 14, at 19:01, Thomas Hartman wrote:
>>
>> FWIW, the problem I was trying to solve was deleting single newlines
>> but not strings of newlines in a document. Dead simple for pcre-regex
>> with lookaround. But, I think, impossible with posix regex.
>
> s/(^|[^\n])\n($|[^\n])/\1\2/g;
>
> POSIX regexen may be ugly, but they're capable.
>
> --
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
> system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
> electrical and computer engineering, carnegie mellon university    KF8NH
>
>
>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to