How to capture float and decimal numbers after equal sign REGEX -


i'm try float or decimal numbers grep -p

example= jrockit.gc.latest.yc.number = 5034;

i want 5034.

here regex => (?:\s*=\s*)([0-9.]+) equal sign.

how number?

use \k keeps text matched far out of overall regex match.

grep -op '\s*=\s*\k[0-9.]+' file 

or

grep -op '\s*=\s*\k\d+(?:\.\d+)?' file 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -