On 12-10-01 01:50 PM, [email protected] wrote:
  Hi all,

Can anyone suggest a way to selectively replace uppercase letters with 
lowercase using regexp?

My goal is to perform the following substitution:

name_Function -> name_function

My attempt so far was:

Search: _[A-Z]
Replace : _\1

Either the search or the replace miss the conversion.

Thanks in advance


You could use the "Send selection to"[1] feature with Perl command (something like "perl -pe 's/_([A-Z]+)/_\L$1/'" seems to work) or other shell utilities (tr/awk/sed/etc). Unfortunately the regexp in Geany doesn't seem to allow the \L thing.

Cheers,
Matthew Brush

[1] http://www.geany.org/manual/current/index.html#sending-text-through-custom-commands
_______________________________________________
Geany mailing list
[email protected]
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany

Reply via email to