I have a file so that each line is like this:
A|B
How can I change it using a regex so that I can have this as final res开发者_开发技巧ult:
A|1|||B|||
Example: 1ARC00138|34 results in 1ARC00138|1|||34|||
Find:
(.+)\|(.+)
Replace with:
\1|1|||\2|||
This replacement regex:
s/^(.*)\|(.*)$/\1|1|||\2|||/
精彩评论