...

View Full Version : Regular Expression to match this



kevinkhan
11-02-2009, 11:11 AM
Hi guys.

Im looking for a regular expression to match html in this format


<a class="fn repname_busName repkey_IE_600885_5" href="/Florists/Aisling_Flowers_Cork/IE_600885_5">Aisling Flowers Cork</a>

$strListMatches = '!<a class="fn repname_busName repkey_IE_[0-9]*_[0-9]*" href="(.*)">(.*)</a>!isU';

but it doesnt seem to work.

Can anyone help me out?

oesxyl
11-02-2009, 11:22 AM
Hi guys.

Im looking for a regular expression to match html in this format


<a class="fn repname_busName repkey_IE_600885_5" href="/Florists/Aisling_Flowers_Cork/IE_600885_5">Aisling Flowers Cork</a>

$strListMatches = '!<a class="fn repname_busName repkey_IE_[0-9]*_[0-9]*" href="(.*)">(.*)</a>!isU';

but it doesnt seem to work.

Can anyone help me out?
Probably I will never understand why people generate code in a place and then try to write complicate regex to parse it in another place on the same site.
Anyway you didn't say what do you want to match, or you said and I miss it?

best regards

kevinkhan
11-02-2009, 11:58 AM
Probably I will never understand why people generate code in a place and then try to write complicate regex to parse it in another place on the same site.
Anyway you didn't say what do you want to match, or you said and I miss it?

best regards

I want to extract the title and link...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum