in reply to Need RegEx assistance

Two approaches suggest themselves: One is to slurp the entire file into memory, and then use /m or /s to build a regexp that spans lines, doing a substitution on the entire block in one swell s///gs.

If you can't fit the file into memory, or fear doing regexps that span lines, you could do a two-pass substitution. On the first pass, build up a hash that maps [get] to the trailing component of the URI, then rewind the file and make the subsitution on the second pass. This lets you use simple regexps.

If you haven't done regexps that match multiple lines, now's your chance. Go with method 1, and add to your bag of tricks.