Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pcre2 #249

Merged
merged 11 commits into from
Feb 16, 2022
Merged

Migrate to pcre2 #249

merged 11 commits into from
Feb 16, 2022

Conversation

tobil4sk
Copy link
Member

@tobil4sk tobil4sk commented Feb 15, 2022

Closes #247

This updates the regex code to use the pcre2 library.

Behaviour should be mostly identical, apart from two intentional changes:

  • An exception is now thrown when attempting to get match data after a match error, just like when getting match data after a string did not match. (Previously we would get "null" after a match error). This matches behaviour on most other targets (Python, C++, JavaScript, SWF, Hashlink, Java)
  • null character no longer breaks patterns Null character breaks regex patterns haxe#10592

Would be good for someone to double check.

@skial skial mentioned this pull request Feb 16, 2022
1 task
@Simn
Copy link
Member

Simn commented Feb 16, 2022

I see green CI, I merge.

@Simn Simn merged commit 4a7b090 into HaxeFoundation:master Feb 16, 2022
@tobil4sk tobil4sk deleted the pcre2 branch February 16, 2022 16:43
@tobil4sk tobil4sk mentioned this pull request May 8, 2022
andyli pushed a commit that referenced this pull request Jul 4, 2023
* [regex] Update pcre to pcre2

* [regex] Throw if accessing match after match error

* [regex] Prevent null character breaking patterns

e.g. `new EReg("abc\x00def", "")` would erroneously match "abc"

HaxeFoundation/haxe#10592

* [regex] Add TODO regarding pcre2_substitute

* [cmake] Fix static Apache build

We can no longer link pcre as we use pcre2

* [cmake] Fix windows pcre static build

* [cmake] Download old PCRE for Apache

* [cmake] Remove unused flag for pcre windows build

* [cmake] Reenable PCRE_STATIC cmake flag for Win

* [cmake] Use https for pcre download for Apache

Co-authored-by: Simon Krajewski <simon@haxe.org>
# Conflicts:
#	Earthfile
#	README.md
#	extra/azure-pipelines/Brewfile-STATIC_DEPS_NONE
#	libs/CMakeLists.txt
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.

migrate pcre
2 participants