in reply to extract whole sentence after a match of a word
When you search for a regex, you can match it against several elements in the string. Assuming you mean a literal number, rather than the word "number", use m/^(\d+)(.+)$/, as it will only match if there's a number at the very start.
Once matched, the number itself will be assigned to $1, and the rest of the line, up to the EOL mark, to $2.
Make sure to match only what you need, though. If the number is displayed as 'xxxx.xx', or 'xx,xxx', the regex will fail.
As for the second part, yes, it is possible. How is a question of the output format, so more information is needed.
Software speaks in tongues of man.
Stop saying 'script'. Stop saying 'line-noise'.
We have nothing to lose but our metaphores.
|
|---|