develooper Front page | perl.perl6.users | Postings from May 2019

Need help with a regex

Thread Previous | Thread Next
ToddAndMargo via perl6-users
May 7, 2019 03:10
Need help with a regex
Message ID:
Hi All,

What am I doing wrong here?

$ p6 'my $x="\$1.23"; $x~~s/("\$") (.*?)/$1USD/; say $x;'

I am expecting to seeĀ  `1.23USD`

Many thanks,

Computers are like air conditioners.
They malfunction when you open windows

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About