summaryrefslogtreecommitdiffstats
path: root/regex.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-09-11 19:55:32 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-09-11 19:55:32 -0700
commitfc5935a9fe816d64291e66b1ca5133a27f5f0230 (patch)
treeffd7371d6ee3817aedf45d63e6606f072a16ac83 /regex.h
parent6417918274d7d7d8d5b7bb675906f8e38d25c073 (diff)
downloadtxr-fc5935a9fe816d64291e66b1ca5133a27f5f0230.tar.gz
txr-fc5935a9fe816d64291e66b1ca5133a27f5f0230.tar.bz2
txr-fc5935a9fe816d64291e66b1ca5133a27f5f0230.zip
regex: new function, regex-prefix-match.
This new function allows a program to determine whether a given string is the prefix of any of the strings denoted by a regular expression; or, in alternative words, whether a given string is the prefix of a possibly longer string which matches a regular expression. * regex.c (regex_machine_infer_init_state): New static function. (regex_prefix_match): New function. (regex_init): regex-prefix-match intrinsic registered. regex.h (regex_prefix_match): Declared. * txr.1: Documented.
Diffstat (limited to 'regex.h')
-rw-r--r--regex.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/regex.h b/regex.h
index 77375454..3ad158ba 100644
--- a/regex.h
+++ b/regex.h
@@ -42,6 +42,7 @@ val match_regex_right(val str, val regex, val end);
val search_regst(val haystack, val needle_regex, val start_num, val from_end);
val match_regst(val str, val regex, val pos);
val match_regst_right(val str, val regex, val end);
+val regex_prefix_match(val reg, val str, val pos);
val regsub(val regex, val repl, val str);
val read_until_match(val regex, val stream, val keep_match);
val regex_match_full(val regex, val arg1, val arg2);