REGEX-Escape for: /^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i

Your Input:
Result, the escaped string:
\/\^\[1\-9\]\[0\-9\]\{3\} \?\(\?\!sa\|sd\|ss\)\[a\-z\]\{2\}\$\/i

What must the escaping look like for:
/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i

The excaped text for use in a regex is:
\/\^\[1\-9\]\[0\-9\]\{3\} \?\(\?\!sa\|sd\|ss\)\[a\-z\]\{2\}\$\/i


Ads