Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2025, 04:41 AM
LtB LtB is offline S&R not successful Windows 10 S&R not successful Office 2016
Novice
S&R not successful
 
Join Date: Jul 2025
Posts: 2
LtB is on a distinguished road
Default S&R not successful

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
Reply With Quote
  #2  
Old 07-17-2025, 02:43 PM
macropod's Avatar
macropod macropod is offline S&amp;R not successful Windows 10 S&amp;R not successful Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 07-18-2025, 03:42 PM
LtB LtB is offline S&amp;R not successful Windows 10 S&amp;R not successful Office 2016
Novice
S&amp;R not successful
 
Join Date: Jul 2025
Posts: 2
LtB is on a distinguished road
Default RegEx

Quote:
Originally Posted by macropod View Post
You could use a wildcard Find/Replace with:
Find = ([0-9]{4}.)^32
Replace = \1^t

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:
Originally Posted by macropod View Post
This will put tabs after
18 septembre 1832.
and
14 janvier 1871.

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
Reply With Quote
  #4  
Old 07-18-2025, 04:16 PM
macropod's Avatar
macropod macropod is offline S&amp;R not successful Windows 10 S&amp;R not successful Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

Tags
special_characters, wildcards



Similar Threads
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

Other Forums: Access Forums

All times are GMT -7. The time now is 10:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft