Feature wish: case options for regex replace

A swapping-ground for Regular Expression syntax

Feature wish: case options for regex replace

Postby Stefan » Mon Jun 27, 2005 10:33 am

Hi Jim, how are you?

Is it possible for you to add this features
to regex replace options ?

\L  ower, all chars
\U  pper, all chars
\S  entence, only the very first char in the sentence upper
\W ords, every first char of all words upper
\C  owboy, rANdom cASe


i.e.

i have e.g. this file
==> the goo goo dolls - give a little bit.mp3


i wanna regex search for
===> (.+) - (.+)(\.mp3)


and regex replace with
===> \1\W - \2\S\3\U


to get
===> The Goo Goo Dolls - Give a little bit.MP3



would be nice :D
thanks,
stefan
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Postby Admin » Mon Jun 27, 2005 1:27 pm

Hi Stefan,

Unfortunately I am constrained by the fucntionality of the PCRE library. I do not know if there is a more recent version of the DLL available which supports these functions.


Jim
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Postby Stefan » Mon Jun 27, 2005 2:14 pm

I'am think that's no issue of regex
but of your own code.

You should try to catch the regex output,
and if a "\U" is found,
change all chars to upper
till an other "\x" option is given
or the output ends.

(Maybe an other char like $ for $U, $L ... will be better?)


Sorry if i didn't find they correctly words, i don't wanna push you!

----

Easy to wrote but hard to code,
but i saw such features in other renamer
so i just ask you if you could do that too ;-)


Togehter with my other wish "excaption list for case change"
BRU will become my favorite [MP3] renamer
for i didn't want to carry diverrent tools with my USB stick :wink: <== smilys don't work ?
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Hmmm...

Postby clock345 » Sat Oct 08, 2005 11:38 am

Hi Stefan,


I think that that's a rather good meathod.
clock345
 
Posts: 7
Joined: Sat Oct 08, 2005 11:37 am

Postby Stefan » Mon Oct 10, 2005 2:50 pm

The one and only intention of the posts from clock345
is to spam only and shot be deleted.
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to Regular Expressions