[Geany] replace uppercase with lowercase
Matthew Brush
mbrush at xxxxx
Mon Oct 1 21:48:31 UTC 2012
On 12-10-01 01:50 PM, papawaigo at virgilio.it 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
More information about the Users
mailing list