source is 1234567890
, the regular expression ((?<=\d)\d{3})*\b
can match: 234567890
, so i think sed
should replace 234567890
with TEST
, but the result is: 1234567890
, why?
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
- Improve converting string to readable urls
look-behind is not supported by sed. you could try ssed (super sed), it supports perl mode, (-R) then you could pass perl style regex to it. e.g. look ahead/behind.
see the feature list:
https://launchpad.net/ssed
You need to rewrite the regex without lookbehind: