79546642

Date: 2025-03-31 15:38:41
Score: 0.5
Natty:
Report link

Would this work?

REGEX PATTERN (PRCE2 Flavor):

"([^"]*)"|'([^']*)'

Regex demo: https://regex101.com/r/FX3WX4/1

TEST STRING:

This "searchword1". searchword.  "search 'word' 2"
This "searchword3". searchword.  "search 'word' 4"

MATCH / GROUP

MATCH 1 5-18    "searchword1"
GROUP 1 6-17    searchword1

MATCH 2 33-50   "search 'word' 2"
GROUP 1 34-49   search 'word' 2

MATCH 3 56-69   "searchword3"
GROUP 1 57-68   searchword3

MATCH 4 84-101  "search 'word' 4"
GROUP 1 85-100  search 'word' 4
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: rich neadle