Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] regexp help: matching selectors


  • From: paul at novitskisoftware.com (Paul Novitski)
  • Subject: [Javascript] regexp help: matching selectors
  • Date: Wed Jun 29 16:22:40 2005

I'm developing regular expressions that will match CSS-style selectors.

Here's my first stumbler:

	/html( \w+)* div/

(Intended to mean: the word "html" followed by zero-or-many instances of [a 
space followed by one-or-many word characters] followed by a space and then 
the word "div")

I want this to match with:

	html div
	html body div
	html body div#logo

etc.  Can you explain to me why it's not working?

Thanks,
Paul