![]() |
|
#1
|
|||
|
|||
![]()
In Word 2016 I have a list of a 11.000 historical military people that I want to turn into a table to be used in a sortable Excel later. It's OCR-d from a pdf of an old book, around 10% non trusted result)
They all look like this (One man per paragraph): de CHARETTE de LA CONTRIE, Athanase, nĂ© Ă* Nantes (Loire-InfĂ©rieure), 18 septembre 1832. — Lieutenant-colonel, commandant la LĂ©gion des Volontaires de lÂ’Ouest, 7 octobre 1870 ; GĂ©nĂ©ral de brigade, 14 janvier 1871. Combat de Brou ; bataille de Loigny. BlessĂ© Ă* Loigny. — Chevalier de la LĂ©gion dÂ’honneur, 8 dĂ©cembre 1870 ; Officier de la LĂ©gion d'honneur, 20 juillet 1871. I have already placed tabs before and after "nĂ© Ă*" with a simple S&R. Now I need a tab AFTER the first date ( right after the first right bracket, always 19th century). So in the search box I typed ), ^# <(*)> 18^#^#. and in the Replacebox : ^t^&^T (Intending a second run with the two-digit days, and to do a correction by switching the first tab and the bracket later) But it does not work : nothing is found. It says (Transl. from Dutch): ^# is not a valid part of a searchstring or it's not supported when using wildcards is enabled I have tried a lot of variants, but no dice What am I doing wrong? Leo |
#2
|
||||
|
||||
![]()
You could use a wildcard Find/Replace with:
Find = ([0-9]{4}.)^32 Replace = \1^t This will put tabs after 18 septembre 1832. and 14 janvier 1871.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]() Quote:
But that's RegEx! I am afraid of RegEx. In forums I always hear that there are 42792 versions of RegEx, so I have never tried it. Maybe I should. Is there a RegEx for Dummies somewhere? Best with a descriptions of the differences between the main Quote:
I need a tab before AND after the date. 18 septembre 1832 is de date I need, and it's the only date. I cannot have a Tab after 14 Janvier 1871. Enfin, merci pour votre essay de m'aider! Leo |
#4
|
||||
|
||||
![]()
It's not RegEx at all. It's a Word wildcard Find/Replace. Although there are some similarities, they are not the same.
For what you want, try a Word wildcard Find/Replace with: Find = ([!^13]@) ([0-9]{1;2} [jfmasond][a-eéilm-prt-v]{2;8} [0-9]{4}.) (*^13) Replace = \1^t\2^t\3 This assumes the months will all have valid characters. If not, try: Find = ([!^13]@) ([0-9]{1;2} [jfmasond][! ]{2;8} [0-9]{4}.) (*^13) Replace = \1^t\2^t\3
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
special_characters, wildcards |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tell me which place the vlookup was successful (within a nested vlookup) | Izzii0x | Excel | 2 | 07-18-2019 10:29 PM |