I'm trying to write a regex that will accept the following string:
<#cinput: type="select" name="fk_pl_mplyposid[]" table="pl_en_plypos" id="ID" values="Position" other="MULTIPLE" />
The main problem stems from the fact that the string contains square braces ([]). I can write a regex to accept a string with an opening square brace:
$regex_custom_input = "<#cinput: ((type|name|table|id|values|other)=\"[[a-zA-Z0-9_]+\" )+/>";
but not one that includes both square brackets. I'm using the PHP function ereg() to evaluate the regex. According to the POSIX documentation to get the closing sqr. bracket to work you have to:
To include a literal ]' in the list, make it the first character (following a possible').
So I figured the regex:
$regex_custom_input = "<#cinput: ((type|name|table|id|values|other)=\"[][a-zA-Z0-9_]+\" )+/>";
would work but no luck.
Ideas?