Guest User

Untitled

a guest
Jan 16th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. s/"([^"]*)$([a-zA-Z0-9:]*)([^"]*)"/"1${2}3"/g
  2.  
  3. sed -e ':loop' -e 's/"([^"]*)$([a-zA-Z0-9:]{1,})([^"]*)"/"1${2}3"/' -e 't loop'
  4.  
  5. sed -e ':loop' -e 's/^([^"]*("[^"]*"[^"]*)*)"([^"]*)$([a-zA-Z0-9:]{1,})([^"]*)"/1"3${4}5"/' -e 't loop'
  6.  
  7. echo 'a "$a" b $b "b $b b $b" $c c $c "$c c $c"' |
  8. sed 's/"([^"]*)"/"n1n"/g;:a;s/nn//;ta;s/n$([a-zA-Z0-9:]+)/${1}n/;ta;s/n(.)/1n/;ta'
  9. a "${a}" b $b "b ${b} b ${b}" $c c $c "${c} c ${c}"
Add Comment
Please, Sign In to add comment