Only numbers (0-9) and letters (a-z)

A swapping-ground for Regular Expression syntax

Only numbers (0-9) and letters (a-z)

Postby tangraweb » Thu Jul 14, 2011 1:19 pm

Hello there!

I was wondering if anyone could help me. I looked at all the other post but i couldn't find an answer.

I'm looking for a regular expression that deletes all characters ($, %, & etc.) from the filename.
The only characters that are allowed are a-z and 0-9. Spaces should be converted to _ (underscore)

Thanks in advance!
tangraweb
 
Posts: 1
Joined: Thu Jul 14, 2011 1:16 pm

Re: Only numbers (0-9) and letters (a-z)

Postby Stefan » Thu Jul 14, 2011 5:40 pm

Hi

You have to rename your files two or more times to get all this request solved.

Note:
Best make an backup first, and test the use of BRU with some sample files!


I'm looking for a regular expression that deletes all characters ($, %, & etc.) from the filename.
The only characters that are allowed are a-z and 0-9.

That didn't work with BRU regex function because you have to match the whole string always, not only single signs.

Instead see what Remove(5) can do for you:
D/S: remove double spaces
Sym: remove symbols like !$&,-_#
or
Chars: [ your list of signs to remove ]




Spaces should be converted to _ (underscore)

Use Repl.(3)
Replace: [ ]
With: [_]
Replace an blank with underscore.
Don't use this together with "Remove(5) Sym:[X]" enabled ;-)


.
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to Regular Expressions