I am making a web app, and in my admin side there's a functionality to add a dynamic input. The admin will enter a text into the textarea like:
'sample: _4_' | 'sample2: _some_'
What I want to achieve is that, I wanna replace the first ' to <p> and the second ' to </p> and when separator (|) meets, replace again the first ' to <p> and second ' to </p>. Final output would be
<p>sample: _4_</p> <p>sample2: _some_</p>
Is it possible? I really dont know the code. Thanks!