Originally Posted By: Tomao
You can also use \50 in place of \x28


I prefer to use hex for literals as there is no ambiguity. If you want to use octals for literals, I would suggest to use \050 because \0 followed by two additional digits is always interpreted as a octal, whereas \50 is ambiguous and PCRE has to decide if its a backreference or an octal.

Originally Posted By: Tomao
You're right about not being able to escape the parenthesis. I think mIRC mistakes it for its own bracing or something.

This also applies to mIRC's regex on text event, which doesn't have escape sequence. The only solution is using octal chrs.

Though most special characters can be treated literal when using the $regex() identifier.


Actually if you put the pattern in a variable, the escaped open paren doesn't interfere with mirc's parsing.

Code:
  var %subj = <a href="#" onclick="NU.popup('/fc-knudde/1000709/popup.html','Cartoon','480','730'); return false;">
  var %pat = /\('([^']+)/
  noop $regex(%subj, %pat)
  echo -s $regml(1)