3

I have string. It can be in the following format

Folkestone Result

Ascot (IRE) Result

Folkestone Last (IRE) Result

Winterfall Win Result

Help create a regular expression to search for words in bold!

(.*)(?=\()|Result

My version is not quite working correctly

1 Answers1

2

I have solution!

/^(.*?)(?=\(|Result)/m

Alternation inside the lookahead. Use in multiline-mode: m modifier

test at regex101, regex faq

Community
  • 1
  • 1
Jonny 5
  • 12,171
  • 2
  • 25
  • 42
  • 2
    Wow that is such a great tool you shared here @Jonny5 ! I was using rubular.com but I will change for refex101 for sure! Thanks – MrYoshiji May 14 '14 at 17:18