Test, validate and match regular expressions
This regex matches the literal string 'PI~' followed by any number of digits (including none). It is useful for extracting PI~ identifiers or codes from text, such as in EDI messages or log files, especially when multiple occurrences need to be found across lines (global multiline flags).