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

请问RouteParse中的各种正则表达式的作用? #1

Closed
erikaemma opened this issue Mar 15, 2019 · 3 comments
Closed

请问RouteParse中的各种正则表达式的作用? #1

erikaemma opened this issue Mar 15, 2019 · 3 comments

Comments

@erikaemma
Copy link

大部分比较模糊,现在只能提出几个问题哈,比如~~包围的正则是什么作用(学习的都是//包围的)?为什么大段文本的标识符要加''且只能用REGEX(用phpstream,换了个关键字然后ide爆红了)其实还有很多哈,还是想如果您能直接给讲解一下将不胜感激

@parvinshi
Copy link
Owner

大部分比较模糊,现在只能提出几个问题哈,比如~~包围的正则是什么作用(学习的都是//包围的)?为什么大段文本的标识符要加''且只能用REGEX(用phpstream,换了个关键字然后ide爆红了)其实还有很多哈,还是想如果您能直接给讲解一下将不胜感激

~~包围是正则匹配的边界符,<<<'REGEX'...REGEX;是PHP heredoc语法

@parvinshi
Copy link
Owner

https://github.com/nikic/FastRoute/blob/master/src/RouteParser/Std.php这里发现了一样的正则代码哈?还请详解

学习fastroute的,请看PHP文档、自己网上查关于正则的资料

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

No branches or pull requests

2 participants