consider I have a text like :
<code>Some text 1
`special text`
Some text 2
</code>
<code>Some text 1
`special text`
Some text 2
</code>
Some text 1
`special text`
Some text 2
I can get “special text” with regex, but I want other parts of the text too as an array, something like this :
<code>[
Some text 1,
special text,
Some text 2
]
</code>
<code>[
Some text 1,
special text,
Some text 2
]
</code>
[
Some text 1,
special text,
Some text 2
]
I’ve tried below pattern, but I think it’s not the answer
<code>/(.*)`(.*)`(.*)/gm
</code>
<code>/(.*)`(.*)`(.*)/gm
</code>
/(.*)`(.*)`(.*)/gm