0

Suppose I have a line like this:

abc + def - vfg *

I want my output to be like this:

abc

def

vfg

If only a single operator is there, I can replace: \r\n+ with + but how to do it irrespective of all operators?

Is this possible using regex in Notepad++?

amiregelz
  • 8,099
  • 12
  • 48
  • 58
user1788115
  • 31
  • 1
  • 2

1 Answers1

0

If the order of the operators doesn't matter, you can use this regex to match any of those 3 operators:

[\+\-\*]

and replace it with:

\r\n

If the order is important, you can use capture groups, and match with this regex:

(.*)\+(.*)\-(.*)\*

and replace it with:

$1\n$2\n$3
amiregelz
  • 8,099
  • 12
  • 48
  • 58