11 Commits

Author SHA1 Message Date
George Potoshin
5335bdbe34 [core:text/regex] Follow up to fix #6323 and add test case. As was said in the issue discussion I had suspicion that there may be a sibling bug in .Assert_Non_Word_Boundary implementation and I was able to confirm that with re.findall(rB", ") python code. Odin implementation outputed an empty string wherase python gave "'". That is the same bug related to incorrect logic on string ends. This commit makes implementation of those 2 instructions cleaner and adds a test case. 2026-02-25 14:33:09 +01:00
Jeroen van Rijn
e696073d7b [core:text/regex] Fix #6323 and add test case
Thanks to @GPotoshin for the fix.
2026-02-25 10:49:27 +01:00
gingerBill
842cfee0f3 Change Odin's LICENSE to zlib from BSD 3-clause
This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
2025-10-28 14:38:25 +00:00
Jeroen van Rijn
7a9ea3ee6d Further overhaul of package line comments. 2025-10-09 23:05:29 +02:00
Feoramund
35b157ac83 Fix multiline RegEx iteration
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.
2025-05-26 14:48:45 -04:00
Feoramund
fedb9efb41 Make RegEx VM restartable and fix iterator infinite loop 2025-05-24 07:23:04 -04:00
Jeroen van Rijn
a5e513567b Optimize regex match iterator.
Reuse virtual machine and capture groups between matches.
2025-04-07 14:58:41 +02:00
Feoramund
14858309f0 Add explicit license info to core:text/regex 2024-08-04 19:18:16 -04:00
Feoramund
ff492e615c Use unaligned_load for regex virtual machine
This should hopefully avoid any issues with loading operands greater
than 8 bits on alignment-sensitive platforms.
2024-07-24 16:27:20 -04:00
Feoramund
16b644ad79 Use slice.zero instead 2024-07-24 15:23:20 -04:00
Feoramund
cb0704d51c Add core:text/regex 2024-07-22 14:25:12 -04:00