This commit is contained in:
Xuan Sang LE 2018-02-04 10:58:02 +01:00
commit 01c32d964e
2 changed files with 10 additions and 0 deletions

View File

@ -1,2 +1,5 @@
![Logo](https://github.com/lxsang/ant-http/raw/master/ant-logo.png) ![Logo](https://github.com/lxsang/ant-http/raw/master/ant-logo.png)
# ant-http # ant-http
A light and barebone extensible HTTP web server (HTTPs will be available soon in the next release).
A working demo of the webserver using LUA as server side script available at: [http://os.lxsang.me](http://os.lxsang.me) using username: demo and password: demo

View File

@ -199,6 +199,13 @@ int match_float(const char* search)
{ {
return regex_match("^[+-]?[0-9]*\\.[0-9]+$",search); return regex_match("^[+-]?[0-9]*\\.[0-9]+$",search);
} }
/*
regmatch_t matches[MAX_MATCHES];
if (regexec(&exp, sz, MAX_MATCHES, matches, 0) == 0) {
memcpy(buff, sz + matches[1].rm_so, matches[1].rm_eo - matches[1].rm_so);
printf("group1: %s\n", buff);
}
*/
int regex_match(const char* expr,const char* search) int regex_match(const char* expr,const char* search)
{ {
regex_t regex; regex_t regex;