Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-30-2024, 07:56 AM
mstde mstde is offline Regex-pattern Windows 11 Regex-pattern Office 2019
Novice
Regex-pattern
 
Join Date: Dec 2024
Posts: 2
mstde is on a distinguished road
Default Regex-pattern

Hi,

i wouild like to use a regex-pattern to identify names in a given text. The structure of the text is always the same. The section with the name in a sentence starts with a comma, the comes the name, another comma and further text.
I cannot figure out, how to stop at the first comma after the name:



some text some text, Pep Guardiola, some text some text, some text some text.

my pattern is: ,\s.*, - but it matches up to the third coma: , Pep Guardiola, some text some text,

I tried it on regex101.com for a while, but i cannot figure it out
How is the pattern to be formulated, to match just , Pep Guardiola, ?

Any help is appreciated.

Regards

Michael
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex-pattern Capture group in RegEx alex100 Word VBA 1 01-02-2021 02:39 PM
Regex-pattern Regex over 700 matches in a long doc totoMSOF Word VBA 19 03-11-2019 01:28 PM
Regex-pattern Using VB Regex feature, I tried to replace 'the' and 'this' with 'that' but got screwed abdan Word VBA 3 01-18-2019 09:38 PM
Macro help regex subspace3 Word VBA 1 10-15-2014 09:53 AM
Regex in Word: Replaced strings are in disorder chgeiselmann Word 0 04-26-2009 11:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:17 AM.


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