spiros

  • Administrator
  • Hero Member
  • *****
    • Posts: 857400
    • Gender:Male
  • point d’amour
Regex: match any from a list of words

Code: [Select]
(?:^|(?<= ))(one|common|word|or|another)(?:(?= )|$)
regex - Match list of words without the list of chars around - Stack Overflow

Test suite:

One one's more word'word common word or another word more another
More and more years to match one or more other strings
And common word things and or
Look up Multiple Greek, Ancient Greek and Latin dictionaries — Οὕτω τι βαθὺ καὶ μυστηριῶδες ἡ σιγὴ καὶ νηφάλιον, ἡ δὲ μέθη λάλον· ἄνουν γὰρ καὶ ὀλιγόφρον, διὰ τοῦτο καὶ πολύφωνον (Plutarch)


 

Search Tools