sus-regex/test.c
2024-04-05 12:21:27 +05:00

20 lines
365 B
C

#include <amogus.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
void callback(char* str, int size, void* data) {
char** out = (char**)data;
*out = (char*)malloc(size);
if(str!=NULL)
memcpy(*out, str, size);
else abort();
}
int main() {
char* match;
if(!entry("me\\|\\|ow.*|m(r(r(p..*)))",callback,&match))
return 1;
printf("%s",match);
}