当前位置:网站首页>PHP prompts unknown modifier when using regular

PHP prompts unknown modifier when using regular

2022-04-22 04:49:00 Day____ Day____ Up

php Use regular prompts Unknown modifier ')' , It feels strange that regular brackets should be recognized ,  Here's my regular code :

preg_split('|(\t| )+|', $lineData);

It turns out that / Delimiter or # when , You can work normally , The changed code :

preg_split('/(\t| )+/', $lineData);

summary : How does it seem that regular use | When making a delimiter , If you use parentheses, you will report the above error , So use / perhaps # Or some other alternative . 

版权声明
本文为[Day____ Day____ Up]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210758106123.html