Go to the source code of this file.
Functions | |
char ** | findFirstCaptures (const char *pattern, const char *input_str) |
This file defines APIs for regular expression calls. |
char** findFirstCaptures | ( | const char * | pattern, | |
const char * | s | |||
) |
This file defines APIs for regular expression calls.
Current implementation is c++11 regex library that should be well supported across platform.
TODO this feels a little not as flexible. Maybe make a function that takes int n to find first n matches and all captures
example: pattern="abcd([0-9]+)" s="abcd1234abcd5678" return ["1234", NULL]
pattern | the regular expression pattern | |
s | the target string |
Definition at line 6 of file ckregex.C.
References malloc(), match(), PUP::s, and strdup().