Convert multiple selects from old to new

davez

Member
I'm trying to find a quick way to convert all of my old 2.x multiple selects to the new format:

5|-|6|-|7|-|8|-|9

to

["5","6","7","8","9"]

Any quick tricks someone has figured out? Some regex that could be applied?

Thank you. I have thousands of these to convert.
 
Well, the best I could come up with is the following in Notepad++. Yes, it's a lame 4-part process, but it seems to hold on one table. I'm surprised the "Upgrade from 2.1" didn't do that automatically. Maybe I missed something.

Search:
, '([\w\s]+)|-|
Replace:
, '["\1","

Search:
|-|([\w\s]+)',
Replace:
","\1"]',

Search:
|-|
Replace:
","

Search:
","([\w\s]+)',
Replace:
","\1"]',
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top