[英]Equivalent of Javascript “match” in python
I have a method for extracting all the "words" from a string in javascript: 我有一个方法从javascript中的字符串中提取所有“单词”:
mystring.toLowerCase().match(/[a-z]+/g);
I'd like to convert that same logic (create an array of "words" from my string), but in python. 我想转换相同的逻辑(从我的字符串创建一个“单词”数组),但在python中。 How can I achieve that? 我怎样才能做到这一点?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.