Hi,
Using Regex / Regular Expressions, I want to replace all the instances of 123 with 12 and the final data-set/result should not contain any 123 in it. Example:
Code:
[demo@devhost ~]$ cat data
123333
123123456 123333 12333
[demo@devhost ~]$ cat data | sed 's/123/12/g'
12333
1212456 12333 1233
[demo@devhost ~]$
You can see that there are still instances of 123. So, how do we make sure that the final output would not contain 123?