-3

If I have a string like test string. something \n else how would I split the string on both . and \n characters? I have tried using re.split(". \n", text) but it doesn't seem to be working.

Oliver James
  • 63
  • 1
  • 6

1 Answers1

0

Figured it out - I needed to use re.split("\\.|\n", text).

Oliver James
  • 63
  • 1
  • 6