Another thing, as i just copy-pasted the regex, if anyone can explain what this means?
($regex($1-,/(.*?)\-/i) > 0)
I know (.+?) means to match any character 1 or more times lazily.
In that line of above regex code will match the symbol - more than once.
A backslash is used to escape special characters literally.