Collapsing to ASCII

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

Collapsing to ASCII

Post 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.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post 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
-----------------------------------------
Hope this was helpful.............good luck,
Bob
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

Post by chrisjj »

> Replace with: NOTHING

Thanks, but I need e.g.

>> á -> a, í -> i
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post 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.
Hope this was helpful.............good luck,
Bob
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post 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.
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

Post by chrisjj »

Excellent - thanks Ben.
Post Reply