Made RegEx API similar to old version

This commit is contained in:
Zher Huei Lee
2015-07-24 14:09:39 +01:00
parent 4ca0399ff6
commit 87c1e16834
5 changed files with 17 additions and 15 deletions
+2 -2
View File
@@ -464,8 +464,8 @@ bool test_26() {
OS::get_singleton()->print("\n\nTest 26: RegEx\n");
RegEx regexp("(.*):(.*)");
bool res = regexp.match("name:password");
printf("\tmatch: %s\n", res?"true":"false");
int res = regexp.find("name:password");
printf("\tmatch: %s\n", (res>=0)?"true":"false");
printf("\t%i captures:\n", regexp.get_capture_count());
for (int i = 0; i<regexp.get_capture_count(); i++)