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
Stefan
On 12-10-01 01:50 PM, papawaigo@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-c...
Am 01.10.2012 22:50, schrieb papawaigo@virgilio.it:
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
[..]
Either the search or the replace miss the conversion.
In addition to Matthew's tipp you could also use the toggle case of selection from inside the edit menu. It's a bit more unspecific, but I made some good usage of it in cases similar to your example one.
Cheers, Frank