2010-01-08, 10:11 PM
Trying to create some custom MyCodes and was wondering about how to handle parameters, obviously this works fine:
[test=1]hello world[/test]
As does this:
[test=]hello world[/test]
But when this is posted
[test]hello world[/test]
The MyCode doesn't work because the regex is expecting an "=", how can I change this so it works with or without the parameter? Presumably it involves changing the regex, but my regex skills are limited.
[test=1]hello world[/test]
As does this:
[test=]hello world[/test]
But when this is posted
[test]hello world[/test]
The MyCode doesn't work because the regex is expecting an "=", how can I change this so it works with or without the parameter? Presumably it involves changing the regex, but my regex skills are limited.