Function to validate regular expression
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
I have been missing a core function in PHP to validate a regular expression. I am therefore proposing something like preg_validate().
There are some workarounds mentioned in this StackOverflow thread. But from my understanding they will all produce a PHP warning that needs to be suppressed.
https://stackoverflow.com/questions/4440626/how-can-i-validate-regex
What are your thoughts and opinions on implementing a regex syntax validator?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the proposed preg_validate() entry point and the linked StackOverflow discussion about validating regex syntax. No source file or test is named, so first determine where a PHP core regex-validation function belongs and how warning suppression should be handled. Done requires an agreed implementation scope and tests for the proposed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100