P indicates that n1 and
n2 refer to delimiter numbers and ‘-‘ indicates the character used as the delimiter. If omitted, ‘/’ is assumed. The delimiter must not be numeric.
n1 and
n2 are integers that indicate respectively the delimiter numbers at which the substring is to start and finish; the delimiter before
n1 is always included in the output substring but the delimiter after
n2 is always excluded. If
n1 is omitted then the substring starts at the beginning of the ‘parent’ string, and if
n2 is omitted then the substring ends at the end of the ‘parent’ string. The start and end of the ‘parent’ string are always assumed to be delimiters. For example: