Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "-123 +1234" | grep -Po '(?<=-)123 (?<=+)1234'
- echo "-123 +1234" | grep -Po '(?<=-)123
- 123 1234
- $ echo "-123 +1234" | grep -Po 'd+'
- 123
- 1234
- $ echo "-123 +1234" | perl -nle'@m=/d+/g; print "@m" if @m'
- 123 1234
- $ echo "-123 +1234" | perl -nle'print "$1 $2" if /-(d+) +(d+)/'
- 123 1234
- echo "-123 +1234" | perl -wnE'@m = /([0-9]+)/g; say for @m'
- echo "-123 +1234" | perl -wnE'@m = /(?<=[+-])([0-9]+)/g; say for @m'
- echo "-123 +1234" | perl -wnE'@m = /[+-]([0-9]+)/g; say for @m'
- echo '-123 +1234 456' | grep -oP '(?<=-|+)d+'
- 123
- 1234
- echo '-123 +1234 456' | grep -Eo 'b[0-9]+b'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement