Recent Posts

Caution: Greetings to all visitors. The site is working in short. Links Please skip the link to view any topic and thank you for visiting
header ads

Regex is trimming off too many characters - sometimes

I'm trying to create a form builder that my users can use with a homegrown markup inspired by BBCode converting their questions into actual HTML

I've got a regex "fiddle" up at https://regex101.com/r/5uf7fK/1

I have two examples
Name: [TEXT|enter your name here]
Type of tenancy: [RADIO|This is a periodic tenancy,This tenancy ends on [TEXT|enter date]]
Code (markup):
and the regex I'm using is

preg_match_all("/\[([^\]]*)\]/", $block, $matches);
PHP:
So here's what I'm...

Regex is trimming off too many characters - sometimes

from PHP https://ift.tt/3bu9uy0
via IFTTT

Post a Comment

0 Comments