| Raw Input
| aa@bb\cc\@dd\\@ee\@
a\@bc\\de@\f\\@g\@h
|
|
| Desired Output
| aa#bb\cc\@dd\\#ee\@
a\@bc\\de#\f\\#g\@h
|
|
Script and Comments
Script1 [ 1] :loop
[ 2] s/^((\\.|[^\\@])*)@/\1#/
[ 3] t loop
| |
Script2 [perl] [ 1] while(s/^((?:\\.|[^\\@])*)\@/$1#/)
[ 2] { }
| |
Script3 [perl] [ 1] s/\G((?:\\.|[^\\@])*?)\@/$1#/g;
| |
|