REGEX-Escape for: ^(?=.*(rhapsody))(?!.*(bohemian)).*$

Your Input:
Result, the escaped string:
\^\(\?\=\.\*\(rhapsody\)\)\(\?\!\.\*\(bohemian\)\)\.\*\$


Ads

What must the escaping look like for:
^(?=.*(rhapsody))(?!.*(bohemian)).*$

The excaped text for use in a regex is:

\^\(\?\=\.\*\(rhapsody\)\)\(\?\!\.\*\(bohemian\)\)\.\*\$


Ads