I need to check a string for a specific string, I want to use a regular expression for this, but the more I try, the more it bothers me (and upsets); I don't seem to understand.
I need the expression to return true when the string contains something like this: [[module:instance]] , but it must satisfy the following conditions:
- Always open with two brackets
[[ - After two brackets, a string can contain everything except
: and has no length restrictions for it - After character 1
: must be a character - After
: again a line that can contain everything except : and has no length limit - Always close with 2 brackets
]]
Any help, advice, good tutorials, something would be very helpful!
Thanks in advance!
source share