in reply to shortening substitutions

s/^\s+|\s{4}|[";]//; or possibly s/^\s+|\s{4,}|[";]//;

if you want to get rid of 4 or more spaces

Replies are listed 'Best First'.
Re^2: shortening substitutions
by salva (Canon) on Jun 17, 2005 at 11:38 UTC
    well, this is not equivalent to the OP code. For instance, try applying both to qq("   " foo  ;  )

    Anyway, I'm sure the OP code is missing some /.../g regexp modifiers. He should tell us what he really wants to do, and why he wants to write it on a single statement after all.