regular expressions – regexp after an initial string

I have files, some of 2000+ lines. Many of the lines are in the form:

Foobar: a12t18f8q125e16a8c26

That is, a heading string (in this case Foobar) followed by a specification string, a12t18f8q125e16a8c26.

These lines need to be transformed into

Foobar: a/12, t/18, f/8, q/125, e/16, a/8, c/26

The regexp for the specification string a12t18f8q125e16a8c26 is simple enough:

\(.+?\)\([0-9][0-9]*\) → \1/\2,

I’m stuck getting the regexp to happen after the initial heading string, Foobar:

How can I automate this?

Read more here: Source link