更新时间:2023-02-21 11:37:34
如果你想要以下样本输出的正则表达式模式:
text.45
example.90 >
value.46
然后尝试:
If you want regex pattern for the following sample outputs:
text.45
example.90
value.46
then try:
\b[a-zA-Z]*[.][\d][\d]\b
否则,如果你只需要这些字母:
text
示例
值
然后尝试:
Else if you only want those alphabets:
text
example
value
then try:
\b[a-zA-Z]*(?=[.][\d][\d]\b)
++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++ b $ b
+++++++++++++++++++++++++++++++++++++++++
[amended upon re-understanding]
\b[a-zA-Z]+[.][\d][\d]\b
实际上只需将'*'更改为'+'
actually just need to change the '*' to '+'
尝试:
Try:
[^\d]*\d+