View Single Post
Old 05-17-2025, 06:58 AM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,355
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Try giving it a batch of characters to choose from enclosed with square brackets?
Code:
(?<!”[\s\w\.]+)said\. “
Although I have a feeling that there is a much simpler way to accomplish what you are trying to do instead of this very narrow regex. What is your end goal??

Edit:
You might even try tokenizing the \. in the negative look behind pattern to catch any punctuation \p{P} instead of just periods.
Code:
(?<!”[\s\w\p{P}]+)said\. “
Please note: I’m replying on my phone after spending a very sleepless night with a grandson who is sprouting some molars … please test it and forgive any errors…

Last edited by Turtle91; 05-17-2025 at 07:17 AM.
Turtle91 is offline   Reply With Quote