jquery regex question ?

Posted by Rachel on Stack Overflow See other posts from Stack Overflow or by Rachel
Published on 2010-05-05T15:10:12Z Indexed on 2010/05/05 15:18 UTC
Read the original article Hit count: 196

Filed under:
|

I have following div:

<div id = "zone-2fPromotion-2f" class = "promotion">

How can I get value 2f present in the end, actually it is the value of Promotion and how can I retrieve it ?

I was using

this.match = this.id.match(/(Promotion)-([0-9a-f]{2})/);

but it is not giving me exact result but it gives me array of (Promotion-2f, Promotion, 2f) but this is not what I require. Any guidance and also if any one can refer me to good online resource for regex, it would highly helpful and appreciated.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript