diff options
| author | Tyge Løvset <[email protected]> | 2022-07-30 10:37:50 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-07-30 10:37:50 +0200 |
| commit | 90b4371d8a36ab609c2200289634c171a19f7fff (patch) | |
| tree | 0db596e22fe671ad6f55dfde427a92eed9941c2a /docs/cregex_api.md | |
| parent | 8329299b810b20cb90c2e3aa7ea465dcefa162aa (diff) | |
| download | STC-modified-90b4371d8a36ab609c2200289634c171a19f7fff.tar.gz STC-modified-90b4371d8a36ab609c2200289634c171a19f7fff.zip | |
Added support for more than 9 capture group replacements, e.g. "$12;". Added an inline function cregex_find_sv().
Diffstat (limited to 'docs/cregex_api.md')
| -rw-r--r-- | docs/cregex_api.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/cregex_api.md b/docs/cregex_api.md index fc34e0a8..a71ae31b 100644 --- a/docs/cregex_api.md +++ b/docs/cregex_api.md @@ -33,6 +33,7 @@ int cregex_captures(const cregex* self); // return 1=match, 0=nomatch, -1=error. match array size: at least num groups in RE (1+). int cregex_find(const char* input, const cregex* re, csview match[], int mflags); +int cregex_find_sv(csview input, const cregex* re, csview match[]); // takes string pattern instead of re. (for one-time matches) int cregex_find_p(const char* input, const char* pattern, csview match[], int cmflags); @@ -173,7 +174,8 @@ In order to use a callback function in the replace call, see `examples/regex_rep | [[:punct:]] [[:space:]] [[:upper:]] | Match ASCII character class | * | | [[:xdigit:]] [[:word:]] | Match ASCII character class | * | | [[:^***class***:]] | Do not match ASCII character class | * | -| $***n*** | *n*-th substitution backreference to capture group. *n* in 0-9. $0 is the entire match. +| $***n*** | *n*-th substitution backreference to capture group. ***n*** in 0-9. $0 is the entire match. | * | +| $***nn***; | As above, but can handle ***nn*** < cre_MAXCAPTURES. | * | ## Limitations |
