MyBB Community Forums

Full Version: Okay, Seriously-Regular Expressions?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't think this is a good idea. Wanna know why? Because not everyone knows what a regular expression is or how they work! Like me, I have no idea how to use them! Dodgy

I literally cannot add a (shall I mention incredibly simple) bbcode to my MyBB install. And I doubt that I'm the only person that has this kind of problem... I would recommend offering a simpler bbcode install possibility in the future. Look at how vBulletin and PHPBB do it.
Tutorial - Creating MyCode

If you have no idea how to use regular expressions, then the example one it shows in the ACP will work fine. Basically, it's for advanced usage - for those people who want to limit what the user inputs into the MyCode.

Seriously, though, you can search online for common regular expressions. Even though you might not understand them, they are freely available.
How could the example be improved?? I think it's quite clear, shows exactly how it needs to be set out...
I'd just offer an option-either let the admin use a regular expression, or do it over the regular way (that is [codename(=param2?)]Param[/codename]. Just a recommendation
I somewhat agree with a simpler approach but at least leave the ability to use regexes. Unfortunately using stuff like {text}, {number} etc restricts what an advanced user can do easily.
But as said, there are online references like http://regexlib.com/ for common regular expressions.
That's what I mean. Offer regex, but the other option as well, for people who don't know how to do regex.