regular/notepad++ expressions

56 Views Asked by At

Basically, I'm struggling with extracting data and importing into a new field. Can this be done:

namewithprefix="PS4 | Call of Duty" namewithoutprefix=""

I want it to look like this

namewithprefix="PS4 | Call of Duty" namewithoutprefix="Call of Duty" 

Both on the same line in the xml document

Many thanks

1

There are 1 best solutions below

1
On BEST ANSWER

Find:

namewithprefix="(.+) \| (.+)" namewithoutprefix=""

Replace:

namewithprefix="$1 | $2" namewithoutprefix="$2"

.+ will find any number of 1 or more characters, and anything in () is captured as a variable. The two variables are then used in the replace as $1 and $2.