This is my code. I am wondering what "((?2))" meaning in PHP. thank you for answering.
$p1 = '/^((\d++(\.\d+)?|\((?2)\))((\+|\/|\*|-)(\d++(\.\d+)?|(?2)))*)$/';
This is my code. I am wondering what "((?2))" meaning in PHP. thank you for answering.
$p1 = '/^((\d++(\.\d+)?|\((?2)\))((\+|\/|\*|-)(\d++(\.\d+)?|(?2)))*)$/';
From https://regex101.com/ :
2nd Alternative ((?2))
( matches the character ( literally (case sensitive)
(?2) recurses the 2nd subpattern
) matches the character ) literally (case sensitive)