aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;