题解 | #提取数字电话#
提取数字电话
https://www.nowcoder.com/practice/6e25b95632e6433db4b5053f91138cb5
import re x = input() result = re.sub("[a-z]+|[A-Z]+|-","" ,x,flags=0) # flags=0表示替换所有. |表示或者 print(result)
提取数字电话
https://www.nowcoder.com/practice/6e25b95632e6433db4b5053f91138cb5
import re x = input() result = re.sub("[a-z]+|[A-Z]+|-","" ,x,flags=0) # flags=0表示替换所有. |表示或者 print(result)
相关推荐