replace multi deffrent strings in one time

A swapping-ground for Regular Expression syntax

replace multi deffrent strings in one time

Postby guyguy2008 » Tue Mar 18, 2008 5:14 pm

current file names:
01a B c
02d E f
to:
01a C c
02d K f
pay attention the up letters. They are diffrent and I want to replace them in one time.
Is it impossible? How to do it.
Thanks.
guyguy2008
 
Posts: 4
Joined: Tue Mar 18, 2008 3:45 pm

Re: replace multi deffrent strings in one time

Postby Admin » Tue Mar 18, 2008 5:25 pm

Hi,

What is the pattern? What are the rules you need to make the change? All I can see is random filenames.....both original and new!

Are you always changing B to C etc.?



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

Re: replace multi deffrent strings in one time

Postby guyguy2008 » Wed Mar 19, 2008 6:31 am

I think that there are not regular pattern in the file names. I only want to replace some different words in some filenames in one time.
for example:
a something1 b something2
c something1 d
e something2 f
to:
a A b B
c A d
e B f
replace something1 to A and something2 to B, do them in one time.

Another question is how to delete all letters except [0-9],[a-z] and [A-Z] in some file names in one time.
current filename: ab12@%cd=#ef
to: ab12cdef

many thanks.
guyguy2008
 
Posts: 4
Joined: Tue Mar 18, 2008 3:45 pm

Re: replace multi deffrent strings in one time

Postby Admin » Wed Mar 19, 2008 7:39 am

Hi,

For the first question you can use the Character Translation facility.

For the second question you need to tick the "remove symbols" option.



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

Re: replace multi deffrent strings in one time

Postby guyguy2008 » Wed Mar 19, 2008 10:35 am

many many thanks.
guyguy2008
 
Posts: 4
Joined: Tue Mar 18, 2008 3:45 pm


Return to Regular Expressions