summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZher Huei Lee <lee.zh.92@gmail.com>2015-07-24 14:09:39 +0100
committerZher Huei Lee <lee.zh.92@gmail.com>2015-07-24 14:09:39 +0100
commit87c1e16834a21ac1e42321811cb0efcda4b91b9a (patch)
treec071b6446032791612d4dcf6814871e4c644e810 /bin
parent4ca0399ff6a16c7e5e760d57a7675df61f1f8ef0 (diff)
Made RegEx API similar to old version
Diffstat (limited to 'bin')
-rw-r--r--bin/tests/test_string.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/tests/test_string.cpp b/bin/tests/test_string.cpp
index 7b512a5d99..93b1835b78 100644
--- a/bin/tests/test_string.cpp
+++ b/bin/tests/test_string.cpp
@@ -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++)