Extracting the first part of a string before the character sequence "PPPPP". The template takes 1 string parameter.