Skip to main content
 首页 » 编程设计

Python之如何查找短语中的所有数字单词

2025年04月02日16jirigala

<分区>

我想知道你怎么可能检测到一个短语中的所有数字词。例如

math_str = "one times one plus sin(one hundred fifty three) minus three billion" 
getNumberWords(math_str) #Returns one, one, one hundred fifty three, three billion 

是否有正则表达式模式或其他内容?