0

I have this two example string, and I am building a regex for cover both

[[CONTENT:Image|||23123123123|||urlClipping|||true]]
[[CONTENT:Image|||23123123123|||urlClipping]]

I'm need to separate the inner params from the separators (|||) and the beginning and end ([[,]])

So far I've tried with

\[{2}CONTENT:([^\|]*)\|{3}([^\]]*)\|{3}([^\]]*)(\|{3}([^\]]*))?\]{2}

And

\[{2}CONTENT:([^\|]*)\|{3}([^\]]*)\|{3}([^\]]*)(?:\|{3}([^\]]*))?\]{2}

But both o them merges two params into one

How can I fix this regex?

dragonalvaro
  • 703
  • 1
  • 10
  • 28

0 Answers0