aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Mikhirev2014-11-15 11:39:47 +0300
committerDmitry Mikhirev2014-11-15 11:39:47 +0300
commitb5df366f20e0e734686fb2bf01adff065e0d70da (patch)
treec78fd744ec08caa569724e9fe3bb179bf2c40dd8
parent3d42e48cd375109871d1867fdfce1ce6855da17d (diff)
downloadmake_pcre-b5df366f20e0e734686fb2bf01adff065e0d70da.tar.gz
make_pcre-b5df366f20e0e734686fb2bf01adff065e0d70da.tar.bz2
make_pcre-b5df366f20e0e734686fb2bf01adff065e0d70da.tar.xz
make_pcre-b5df366f20e0e734686fb2bf01adff065e0d70da.zip
added `i' option
-rw-r--r--README.md5
-rw-r--r--pcre.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index a8cc309..4cf310a 100644
--- a/README.md
+++ b/README.md
@@ -64,13 +64,14 @@ Options
`pcre_find` can take optional third argument consisting of one ore more
characters, each of which enables some option:
- $(pcre_find PATTERN,IN,EmsuUxX8)
- $(m PATTERN,IN,EmsuUxX8)
+ $(pcre_find PATTERN,IN,EimsuUxX8)
+ $(m PATTERN,IN,EimsuUxX8)
The following options are implemented:
- `E` enables expansion of pattern before compilation. Note that you will need
to use `$$` instead `$` for matching end of line in this case;
+- `i` makes search case insensitive. The same as in Perl;
- `m` makes regexp treating string as multi-line, i. e. `^` and `$` will match
immediately after or immediately before internal newlines. The same
as in Perl;
diff --git a/pcre.c b/pcre.c
index 9b5ab51..c93382b 100644
--- a/pcre.c
+++ b/pcre.c
@@ -48,6 +48,9 @@ char *match(const char *name, int argc, char **argv)
case 'E':
pat = gmk_expand(argv[0]);
break;
+ case 'i':
+ co |= PCRE_CASELESS;
+ break;
case 'm':
co |= PCRE_MULTILINE;
break;