kimo pryvt
kimo pryvt

Reputation: 503

Powershell compatible regex flavors

I am testing in Powershell, some regex that I get from a program written in another language.

But the regex arent working properly, I know that depending on the regex flavor like PCRE,POSIX. The regex is interpreted in different way.

My question is what are the compatible regex Flavors for powershell?

Upvotes: 2

Views: 1995

Answers (1)

briantist
briantist

Reputation: 47842

The correct flavor is .Net regex, but in online testers like debuggex that don't have it, I use PCRE and it seems to work fairly well.

Other issues you may run into are whether or not you need to escape certain characters in the string for powershell (irrespective of characters that need to be escaped for the regex engine).

Upvotes: 3

Related Questions