Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regex question

Status
Not open for further replies.

richardko

Programmer
Jun 20, 2006
127
US
hi,
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top