aboutsummaryrefslogtreecommitdiff
path: root/tests/core/text/regex
Commit message (Collapse)AuthorAgeFilesLines
* Fix multiline RegEx iterationFeoramund2025-05-261-3/+54
| | | | | | | | | | In `.Multiline` mode: - `^` is now defined to assert the start of the string or that a "\n" or "\r" rune was parsed on last VM dispatch. - `$` is now defined to consume a newline sequence of "\n", "\r", or "\r\n" or to assert the end of the string.
* Add more RegEx testsFeoramund2025-05-241-6/+160
|
* Remove `Global` RegEx flag, default to unanchored patternsFeoramund2025-05-241-12/+12
|
* Make RegEx VM restartable and fix iterator infinite loopFeoramund2025-05-241-2/+3
|
* Optimize regex match iterator.Jeroen van Rijn2025-04-071-2/+1
| | | | Reuse virtual machine and capture groups between matches.
* Return loop index in regex iterator.Jeroen van Rijn2025-04-061-4/+3
|
* {.Glboal} implicit in regex allocator.Jeroen van Rijn2025-04-061-1/+1
|
* Keep -vet happy.Jeroen van Rijn2025-04-061-1/+1
|
* Add iterator for `core:text/regex`.Jeroen van Rijn2025-04-061-0/+57
| | | | | | | | | | | | | | | Usage: ```odin haystack := `xxfoobarxfoobarxx` pattern := `f(o)ob(ar)` it := regex.create_iterator(haystack, pattern, {.Global}) or_return defer regex.destroy(it) for capture in regex.match(&it) { fmt.println(capture) } ```
* Add test for regex preallocated captures.Ycros2024-12-041-0/+37
|
* Fix testsgingerBill2024-08-211-2/+2
|
* Remove debug line from testFeoramund2024-08-051-1/+0
|
* Add explicit test case for Capture `pos`Feoramund2024-08-041-0/+25
|
* Use `regex.destroy` for test capturesFeoramund2024-08-041-4/+1
|
* Test that a RegEx Capture `pos` corresponds to its `groups`Feoramund2024-08-041-0/+7
|
* Remove printing facilities for `Regular_Expression`Feoramund2024-07-241-22/+0
| | | | | | | | | The `original_pattern` introduced a tenuous dependency to the expression value as a whole, and after some consideration, I decided that it would be better for the developer to manage their own pattern strings. In the event you need to print the text representation of a pattern, it's usually better that you manage the memory of it as well.
* Allow configuring of `MAX_CAPTURE_GROUPS` for `n` > 10Feoramund2024-07-241-6/+64
|
* Add test cases for unclosed classes and repetitionFeoramund2024-07-241-97/+66
| | | | Simplified error checking while I was at it, too.
* Add tests for `core:text/regex`Feoramund2024-07-221-0/+1012