REGEX-Escape for: function\s*([A-z0-9]+)?\s*\((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\)\s*\{(?:[^}{]+|\{(?:

Your Input:
Result, the escaped string:
function\\s\*\(\[A\-z0\-9\]\+\)\?\\s\*\\\(\(\?\:\[\^\)\(\]\+\|\\\(\(\?\:\[\^\)\(\]\+\|\\\(\[\^\)\(\]\*\\\)\)\*\\\)\)\*\\\)\\s\*\\\{\(\?\:\[\^\}\{\]\+\|\\\{\(\?\:


Ads

What must the escaping look like for:
function\s*([A-z0-9]+)?\s*\((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\)\s*\{(?:[^}{]+|\{(?:

The excaped text for use in a regex is:

function\\s\*\(\[A\-z0\-9\]\+\)\?\\s\*\\\(\(\?\:\[\^\)\(\]\+\|\\\(\(\?\:\[\^\)\(\]\+\|\\\(\[\^\)\(\]\*\\\)\)\*\\\)\)\*\\\)\\s\*\\\{\(\?\:\[\^\}\{\]\+\|\\\{\(\?\:


Ads