So I have a line:
ID: 54376
Can you help me make a regex that would only return numbers without "ID:"?
NOTE: This string is in a file.
So I have a line:
Can you help me make a regex that would only return numbers without "ID:"? NOTE: This string is in a file. |
||||
|
Try this:
or:
|
|||||||||||||
|
That will print only all numbers and spaces occurring after I've just updated the above a little to make it a little faster with It addresses lines from regex DEMO:
OUTPUT:
|
||||
|
There are many ways of doing this. For example:
|
||||
|
Use
|
|||||
|
Using sed:
The Output:
|
|||||||||
|
Another GNU sed command,
It prints any number after |
|||||
|