Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kmarius committed Jul 5, 2024
1 parent 5742c79 commit cd7d385
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ On success, `compile` and `compile_safe` return a RegExp object. On failure, `co

Each RegExp object `re` has the following fields
```lua
re.last_index -- the position at wchich the next match will be searched in re:exec or re:test (see notes below)
re.source -- the regexp string
re.last_index -- the position at which the next match will be searched in re:exec or re:test (see notes below)
re.source -- the pattern string
re.flags -- a string representing the active flags
re.dot_all -- is the dod_all flag set?
re.dot_all -- is the dot_all flag set?
re.global -- is the global flag set?
re.has_indices -- is the indices flag set?
re.ignore_case -- is the ignore_case flag set?
Expand All @@ -63,8 +63,8 @@ The RegExp object `re` has the following methods corresponding to JavaScript reg
```lua
re:exec(str) -- returns the next match of re in str (see notes below)
re:test(str) -- returns true if the regex matches str (see notes below)
re:match(str) -- returns a list of all matches or nil if no match
re:match_all(str) -- returns a closure that repeatedly calls re:exec, to be used in for-loops
re:match(str) -- returns, for a global regexp, a list of all match strings or nil if no match, calls re:exec(str) otherwise
re:match_all(str) -- returns a closure that repeatedly calls re:exec on a global regexp, to be used in for-loops
re:match_all_list(str) -- returns a list of all matches
re:search(str) -- returns the 1-based index of the first match of re in str, or -1 if no match
re:split(str, limit?) -- splits str at re, at most limit times
Expand Down

0 comments on commit cd7d385

Please # to comment.