Find/Remove (keep only Numbers)

2019-06-10 11:01发布

问题:

Have a text file with

123.234.531.123.5363
Text : some words here... 
Words : awesome//great+++
Rate : 2,231

131.53234.2414.5345.634
Text : some words here... 
Words : painfull//sad
Rate : 182,21

Now I need only the long numbers:

123.234.531.123.5363
131.53234.2414.5345.634

What I should use as find/replace?

edit: My problem solved with ^\D.*$

回答1:

If what you need is the regex for the search, this might work:

\d+\.[.\d]+


回答2:

If you use OS Windows, you can use regular expression in Notepad++ http://markantoniou.blogspot.com/2008/06/notepad-how-to-use-regular-expressions.html