Syntactic Confectionery Delight | |
PerlMonks |
Re: replacing part of a string with its uppercase via regexby choroba (Cardinal) |
on Mar 16, 2014 at 21:44 UTC ( [id://1078552]=note: print w/replies, xml ) | Need Help?? |
The second part of a substitution is just a plain string, not a regular expression. To include a part from the matched string, you have to use capture groups, introduced by parentheses. To uppercase a part of a string, use \U:
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
In Section
Seekers of Perl Wisdom
|
|