我需要一个正则表达式,它可以过滤掉文本中点后可能有数字的数字。
(?:[AZ] \s )(\d+)((.|,)(\d+))?
Text : Expected results : Actual Results
H 24 : 24 : 24
24.5 : 24.5 : 24
24,5 : 24.5 : 24
test5 : 5 : 5
test 5.5: 5.5 : 5
50.752 : 50.752 : 50
出于某种原因,PG 只返回我比赛的第一组。有人能帮助我吗。
select substring('test 5.5', cast('(?:[A-Z]*\s*)(\d+)((.|,)(\d+))?' as character varying)) as convertedvalue