我想抓取字符串开头的第一个字母字符的开头:
||hello there -> hello there
((hello there -> hello there
我正在使用此代码:
str = re.findall('^[^a-zA-Z]+(.*?)', str)
str 给我一个由两个字符串组成的数组,第一个字符串是空白字符串。
最佳答案
我想你想要
re.findall('^[^a-zA-Z]*(.*)', str)
关于python - 字符串开头只允许字母字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9510352/