HCoop
/
hcoop
/
domtool2.git
/ blame
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
blame
(incremental) |
history
|
HEAD
Using PCRE to check regexps passed to Apache
[hcoop/domtool2.git]
/
pcre
/
pcre_sml.c
Commit
Line
Data
931aae14
AC
1
#include <pcre.h>
2
3
int PCRE_SML_validRegexp(const char *s) {
4
pcre *re;
5
const char *error;
6
int erroffset;
7
8
re = pcre_compile(s, 0, &error, &erroffset, NULL);
9
10
if (re) {
11
pcre_free(re);
12
return 1;
13
} else
14
return 0;
15
}