Skip to content

Fix #28: add regex support#32

Open
leftibot wants to merge 1 commit intoChaiScript:masterfrom
leftibot:fix/issue-28-add-regex-support
Open

Fix #28: add regex support#32
leftibot wants to merge 1 commit intoChaiScript:masterfrom
leftibot:fix/issue-28-add-regex-support

Conversation

@leftibot
Copy link
Copy Markdown

Automated fix by @leftibot.

What changed

Fix #28: Add std::regex support as a ChaiScript extras module
Adds a new header-only regex module exposing std::regex, std::smatch,
regex_search, regex_match, and regex_replace to ChaiScript. Includes
support for regex flags (e.g. icase) and match result access via
smatch indexing. Follows the existing module pattern used by math
and string_methods.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Files

 include/chaiscript/extras/regex.hpp | 70 +++++++++++++++++++++++++++++++++++++
 tests/CMakeLists.txt                |  6 ++++
 tests/regex.cpp                     | 61 ++++++++++++++++++++++++++++++++
 3 files changed, 137 insertions(+)

Closes #28

Triggered by @lefticus.

Adds a new header-only regex module exposing std::regex, std::smatch,
regex_search, regex_match, and regex_replace to ChaiScript. Includes
support for regex flags (e.g. icase) and match result access via
smatch indexing. Follows the existing module pattern used by math
and string_methods.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add regex support

1 participant