Special characters encountered when using split for segmentation

When split is used:

Let's take a look at the usage of split:

You can see that the parameter in split is a regular expression. There are some special characters in the regular expression, which have their own usage:

http://www.fon.hum.uva.nl/praat/manual/Regular_expressions_1__Special_characters.html

The solution of the above method is to use escape to split:

Summary:

Pay attention to the escape of special characters when performing regular operations on strings.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>