可以使用正则表达式来提取数字。以下是一个示例:
```python
import re
text = "Y
PV
RMS
325.81 [nm]
37.23 [nm]"
pattern = r'd+.d+|d+'
result = re.findall(pattern, text)
print(result)
```
输出结果为:
```
['325.81', '37.23']
```
```python
import re
text = "Y
PV
RMS
325.81 [nm]
37.23 [nm]"
pattern = r'd+.d+|d+'
result = re.findall(pattern, text)
print(result)
```
输出结果为:
```
['325.81', '37.23']
```