Page 1 of 1
Collapsing to ASCII
Posted: Tue Oct 09, 2007 10:56 pm
by chrisjj
I want to remove the diacritics from a few dozen characters e.g. á -> a, à -> i etc. in hundreds of files.
Is there any way I can do the set in one operation? I do not want to do one char at a time, every file being touched ones for every character replacement.
Thanks.
Posted: Tue Oct 09, 2007 11:26 pm
by Bob Hansen
Use the pipe character "|" in a group as an OR delimiter.
Seaarch for: [á|->|a|Ã|->]
Replace with: NOTHING
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Posted: Tue Oct 09, 2007 11:49 pm
by chrisjj
> Replace with: NOTHING
Thanks, but I need e.g.
>> á -> a, à -> i
Posted: Wed Oct 10, 2007 1:32 am
by Bob Hansen
Oops!...sorry about that. Thought you wanted to remove complete character.
I just reread and saw you only want to remove the diacritics, not the whole character. I guess you want to replace the character without the diacritic?
In that case, I think you will need to make multiple passes, one pass for each character group. All the "a"s, all the "e"s, etc. But you can still use the "|" to replace them in character groups which should reduce the number of passes.
If this is something to be done on a regular basis, make a macro to do the multiple passes in one sequence.
Posted: Wed Oct 10, 2007 8:02 am
by ben_josephs
Find what: ([áà áâãäå])|([èéêë])|([ìÃîï])|([òóôõöø])|([ùúûü])|([ýÿ])
Replace with: ?1(a):?2(e):?3(i):?4(o):?5(u):?6(y)
[X] Regular expression
[X] Replacement format
Search for
conditional expression in WildEdit's help.
Posted: Wed Oct 10, 2007 8:52 am
by chrisjj
Excellent - thanks Ben.