Function to validate regular expression
未关闭
还没有人认领这个 Issue。
Extension: pcre
Feature
Status: Verified
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 103
描述
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?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从提议的入口点 preg_validate() 以及关于验证正则表达式语法的链接 StackOverflow 讨论开始。没有指定源文件或测试,因此首先确定 PHP 核心的正则表达式验证函数应放在哪里,以及应如何处理警告抑制。完成的标准是就实现范围达成一致,并为提议的行为编写测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100