To remove the trailing delimiter from a delimited string in PHP, you can use the rtrim function.
You can use the re.split() function from the re module in Python to split a string using multiple delimiters.