I have one liner:
perl -pe 's|.*?((\d{1,3}\.){3})xxx.*|\1|'
I pass this command with some input, for example 192.168.1.xxx
, and it works. Now I want to add 0 to the output sequence, but of course, if I just add 0 immediately after \1
, it will be analyzed as the tenth capture group. How can I associate it with the \1
directive?
source share