Re: [jQuery] Re: How do I extract this value?

2010-01-04 Thread Cesar Sanz
What a genius!! Liked the solution. - Original Message - From: To: "jQuery (English)" Sent: Saturday, January 02, 2010 8:54 PM Subject: [jQuery] Re: How do I extract this value? Perfect! 5 stars - Dave On Jan 2, 8:15 pm, MorningZ wrote: var hit = $("#myid&q

[jQuery] Re: How do I extract this value?

2010-01-02 Thread laredotorn...@zipmail.com
Perfect! 5 stars - Dave On Jan 2, 8:15 pm, MorningZ wrote: > var hit = $("#myid").find("a").attr("href").match(/^.+\((\d+)\)$/); > if (hit && hit.length == 2) { >      // hit[1] = "1234" in the example you provided} > > else { >      // didn't find the value > > } > > On Jan 2, 9:13 pm, "laredot

[jQuery] Re: How do I extract this value?

2010-01-02 Thread MorningZ
var hit = $("#myid").find("a").attr("href").match(/^.+\((\d+)\)$/); if (hit && hit.length == 2) { // hit[1] = "1234" in the example you provided } else { // didn't find the value } On Jan 2, 9:13 pm, "laredotorn...@zipmail.com" wrote: > Hi, > > I am using JQuery 1.3.  I have this basic