php prompts unknown modifier when using regular)

PHP uses regular to prompt Unknown modifier')'. It feels strange that the regular brackets should be recognized. The following is the code I used to use regular:

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

Finally, it works normally when the / delimiter or # is used. The modified code:

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

Summary: How does it seem that when using | as a delimiter in regular rules, if parentheses are used, the above error will be reported, so use / or # or other instead. 

Guess you like

Origin blog.csdn.net/weixin_37281289/article/details/106530813