in reply to Re: Reversing Arabic String direction
in thread Reversing Arabic String direction
DB<136> $str ="a123bc45de" => "a123bc45de" DB<137> $str2= reverse $str => "ed54cb321a" DB<138> $str2 =~ s/(\p{N}+)/reverse $1/ge => 2 DB<139> $str2 => "ed45cb123a"
\p{N} is a guess, I'll check now¹! :)
changed order of inversion to make it clearer.
Cheers Rolf
(addicted to the Perl Programming Language)
¹) perlre only mentions \p{Digit} and \p{isDigit} ... both work for me.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Reversing Arabic String direction
by Anonymous Monk on Jul 10, 2014 at 23:09 UTC |