Thread: [Solved] Regex Argument Type Mismatch
View Single Post
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 05-03-2017 , 22:35   Re: Regex Argument Type Mismatch
Reply With Quote #5

Quote:
Originally Posted by Chaosxk View Post
PHP Code:
Regex CountDown = new Regex("/{CountDown:([1-9]+)}/"PCRE_CASELESSRegexErrsizeof RegexErrCountDownError);
//do something
delete CountDown
Not sure what you mean by the 2nd question.
Thanks. My second question was that in PHP, the match's 0th index is the entire substring that matches the pattern. But in GetSubString, 0th is already the first regex capture group

http://php.net/manual/en/function.preg-match.php

Quote:
If matches is provided, then it is filled with the results of search. $matches[0] will contain the text that matched the full pattern, $matches[1] will have the text that matched the first captured parenthesized subpattern, and so on.
RumbleFrog is offline