已关闭
[Bug]: 正则多行匹配时匹配\r作为结尾失败 #12003
hecunmao创建于  2025年12月10日关闭于  2025年12月17日
hecunmao
hecunmao
2025年12月10日 创建

感谢对OpenHarmony社区的支持与关注,欢迎反馈缺陷。

发生了什么问题?

let reg = /^foo$/m;
let res = reg.exec("\rfoo\r");
print(res);

期望:
foo
实际:
null

期望行为是什么?

期望:
foo
实际:
null

如何复现该缺陷

修改HandleOpLineStart,HandleOpLineEnd的匹配逻辑

其他补充信息

版本或分支信息


[x] master

[ ] Release 6.0

[ ] Release 5.1.0

[ ] Release 5.0.3

[ ] Release 4.1

[ ] Other

likedislike
hecunmaohecunmao
2025年12月10日 添加了label:bug
openharmony_ci
openharmony_ci成员
2025年12月10日 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@yingguofeng](https://gitcode.com/yingguofeng) [@weng-changcheng](https://gitcode.com/weng-changcheng) [@dingding5](https://gitcode.com/dingding5) [@ipetrov](https://gitcode.com/ipetrov) [@chuning](https://gitcode.com/chuning) [@gong_19901](https://gitcode.com/gong_19901) 。如果需要调整订阅PR、Issue的变更状态,请访问链接


Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
2025年12月10日 添加了label:waiting_for_assign
hecunmaohecunmao
2025年12月10日 关联了pull request:[Bug]: 正则多行匹配时匹配\r作为结尾失败
openharmony_ciopenharmony_ci成员
2025年12月17日 关闭了 issue