Results 1 to 2 of 2
Thread: regex and sed
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
11-07-2018 #1
regex and sed
https://regex101.com/r/EF2OLR/1
If I have a variable that contains the string:
Code:mac=00:21:f6:04:16:f3bridge=101498d8ff
I have the following:
Code:echo $i | sed -e 's|(mac=00:21:f6:)((\w{2}:?){3})(bridge=\w+)|\1MYSTUFF\4|g'
Code:sed: -e expression #1, char 57: invalid reference \4 on `s' command's RHS sed: -e expression #1, char 57: invalid reference \4 on `s' command's RHS
-
11-07-2018 #2