hi,
i am trying to understand this regex expression and i just want to clarify with the fellow users if my interpretation is right:
the first "?" from the left means this is optional. the "!" after that means anything that doesnt match. The code inside the is optional with the alternatives ... "#" and "javascript".
So anything that doesnt match "#" or "javascript" is matched with those options being optional. I dont understand the use of colon ":" inside the second bracket though.
any idea?
i am trying to understand this regex expression and i just want to clarify with the fellow users if my interpretation is right:
Code:
(?!(?:#|javascript\s*:))
the first "?" from the left means this is optional. the "!" after that means anything that doesnt match. The code inside the is optional with the alternatives ... "#" and "javascript".
So anything that doesnt match "#" or "javascript" is matched with those options being optional. I dont understand the use of colon ":" inside the second bracket though.
any idea?