<div dir="ltr"><div><div><div><div><div>I have some C code with lines that look like:<br></div>stuff1; stuff2; spPtr+=stuff3; maybesomestuff4<br><br></div>I can find only the lines of interest using grep spPtr+=foo.c but I wondered if I could easily use sed to convert those lines to <br>
</div>stuff1; spPtr+=stuff3; stuff2; maybesomestuff4<br><br></div>so basically with ; as a delimiter, swapping group 2 and 3 but only for those lines containing "spPtr+="<br><br></div>Any ideas?<br clear="all"><div>
<div><div><div><div><div><br>-- <br>Dazed_75 a.k.a. Larry<br><br>Please protect my address like I protect yours. When sending messages to multiple recipients, use the BCC: 
(Blind carbon copy). Remove addresses from a forwarded message body before clicking Send. <br>
</div></div></div></div></div></div></div>