简体   繁体   中英

Regex search in text files using Windows Grep

this is driving me crazy. How do I write a regular expression to determine higher value than 0.5 in a search string please?

For example: sd=0.398 sd= is the mandatory text in text document I am searching for using Windows Grep and this string is always 4 digits long after decimal point.

and I would like to search for entries higher than 0.5

Those can be: 0.501 1.567 12.567

以下正则表达式应与sd=匹配,后跟一个十进制数字,该数字在小数点后正好是三位(其中,小数点后的第一位是5+)。

sd=[0-9]+\\.[5-9][0-9][0-9]

I try this.

sd=[0-9]+\.[5-9][0-9]*

SEE DEMO: http://regex101.com/r/dF8nC3/1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM