in reply to substring extraction

You mean like using the regular expression thingies as described in perlre ?

/J\