简体   繁体   English

可以不使用正则表达式来完成吗?

[英]Can this be done without a regular expression?

I've got a string split, using a regular expression. 我已经使用正则表达式对字符串进行了拆分。

 Regex.Split(str, @"\s");

What does this convert to without regex? 没有正则表达式,这将转换为什么? reason being I'm porting this to PHP and an SQL function. 原因是我将其移植到PHP和SQL函数。 Unless you can show me the PHP code for the same... 除非您可以向我展示相同的PHP代码...

您可以使用preg_split

preg_split("/\\s/", str);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM