Multiple searc-replace

General questions about using TextPad

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

Post Reply
speek
Posts: 3
Joined: Mon May 28, 2007 2:40 pm

Multiple searc-replace

Post by speek »

Hi all,

I do have 1 ascii file with > 5.000 lines.
There are hundreds characters present with accent-marks (é ë ü etc).
Search-replace each individual accent-mark (more then 60 diffent types present) by it's equivalent without the accent-mark is rather time consuming.
Is there an easy way to solve this?

Gerrit
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

You could reduce it to one replace for all accented e, one replace for all accented a, ...

Search with regex checked for
[éèê]
replace by
e

Next search with regex checked for
[áàâä]
replace by
a

and so on.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Something like this should do what you want in a single step:

Search | Replace... (<F8>):
Find what: ([àáâãäå])|([èéêë])|([ìíîï])|([òóôõöø])|([ùúûü])
Replace with: (?1a)(?2e)(?3i)(?4o)(?5u)

[X] Regular expression

Replace All
(Look in TextPad's help in the section Reference Information | Replacement Format Strings under the heading Conditionals.)

But it doesn't work.

I have pointed out to TextPad's developers why it doesn't work, and they say they will fix it in the next release.
Post Reply