Search Pattern

Hi,

What’s the right RegEx Search-Pattern to get these Keywords:

  • [Day]
  • [Month]
  • [Year]
  • [ Year]

Tried this

(?<!)\\[(Day|Month|Year| Year)\\]

Any ideas?

And is Strings ReplaceAll as fast as using RegEx?

Thank you

Kems RegExRX suggests that \[(Day|Month|Year| Year)\] is sufficient
Matches all 4 here

[quote=237748:@Norman Palardy]Kems RegExRX suggests that \[(Day|Month|Year| Year)\] is sufficient
Matches all 4 here[/quote]
Norman, you are right, but it matches only the words without the brackets.

So make the pattern include them like
(\[(Day|Month|Year| Year)\])

Thanks Norman, got it with one little change:

(\\[(?:Day|Month|Year| Year)\\])