Click here to Skip to main content
15,890,512 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Regular expressions Pin
MylesOtter11-May-05 10:14
MylesOtter11-May-05 10:14 
GeneralPHP AND JavaScript Pin
progman10-May-05 11:55
progman10-May-05 11:55 
GeneralRe: PHP AND JavaScript Pin
abhi_code11-May-05 2:11
abhi_code11-May-05 2:11 
QuestionSyntax coloring in HTML ? Pin
borax710-May-05 10:51
borax710-May-05 10:51 
GeneralQuick Problem Pin
TofuBug2410-May-05 7:43
TofuBug2410-May-05 7:43 
Generalweb site search problem Pin
Khyati Asher10-May-05 3:34
Khyati Asher10-May-05 3:34 
GeneralRe: web site search problem Pin
markkuk10-May-05 11:37
markkuk10-May-05 11:37 
GeneralReg Ex question. Pin
theJazzyBrain9-May-05 22:14
theJazzyBrain9-May-05 22:14 
Dear CPians,

I am trying to make a regular expression to be used in ASP (VB Script).
I need to search for a specific TAG within an HTML file. I want the regullar expression to provide me with the TAG as one MATCH and all its attribute names and value pairs in SUBMATCHES.

For example if the following TAG existed in an HTML file, my regular expresion should return the tag as it is.

<SPAN id="spanId" onclick="doSomething();">my span</SPAN>

and then I would like to get the atribute pairs as such:

id
spanId
onclick
dosomething


So far I have come up with this pattern:
<SPAN\s*(((\w+)=(.*?))*)?>(?:.*?)</SPAN>

The pattern above would return
the tag as it is in the HTML file.
then all the attributes together as such:

id="spanId" onclick="doSomething();"

and then it will return only the last attribute name-value pair.

onclick
dosomething

discarding the first one (id,spanId)

Any ideas?

theJazzyBrain
Excellence is not an act, but a habit!
Aristotle

GeneralJavascript Form Function Help Needed Pin
angelina_jolie9-May-05 20:37
angelina_jolie9-May-05 20:37 
GeneralRe: Javascript Form Function Help Needed Pin
Yulianto.9-May-05 20:59
Yulianto.9-May-05 20:59 
GeneralRe: Javascript Form Function Help Needed Pin
angelina_jolie9-May-05 21:08
angelina_jolie9-May-05 21:08 
GeneralRe: Javascript Form Function Help Needed Pin
Yulianto.9-May-05 21:14
Yulianto.9-May-05 21:14 
GeneralRe: Javascript Form Function Help Needed Pin
angelina_jolie9-May-05 21:53
angelina_jolie9-May-05 21:53 
GeneralRe: Javascript Form Function Help Needed Pin
Yulianto.9-May-05 22:08
Yulianto.9-May-05 22:08 
GeneralRe: Javascript Form Function Help Needed Pin
angelina_jolie9-May-05 22:11
angelina_jolie9-May-05 22:11 
GeneralRe: Javascript Form Function Help Needed Pin
DavidNohejl10-May-05 0:01
DavidNohejl10-May-05 0:01 
GeneralRe: Javascript Form Function Help Needed Pin
Yulianto.10-May-05 17:00
Yulianto.10-May-05 17:00 
GeneralDetermining the size of the pop window Pin
govann8-May-05 23:17
govann8-May-05 23:17 
GeneralRe: Determining the size of the pop window Pin
JKroschel9-May-05 6:01
JKroschel9-May-05 6:01 
GeneralFlash game in 4 days help Pin
monageasmear8-May-05 0:24
monageasmear8-May-05 0:24 
GeneralRe: Flash game in 4 days help Pin
MoustafaS9-May-05 9:43
MoustafaS9-May-05 9:43 
Generalreatime format/parse of <TEXTAREA> in JScript Pin
scorpion6666-May-05 12:53
scorpion6666-May-05 12:53 
GeneralAllwebMenus Pin
Alice-fido6-May-05 8:29
sussAlice-fido6-May-05 8:29 
GeneralNesting divs Pin
benjymous6-May-05 2:16
benjymous6-May-05 2:16 
General&lt;li&gt; Tag Pin
Bassam Abdul-Baki6-May-05 2:11
professionalBassam Abdul-Baki6-May-05 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.