I love learning new things but this is kind of complicated...
I wrote this from what i looked up:
var theid=new RegExp('\d+$');
var isthere = theid.exec("ww_1");
console.log(isthere);
But all i get is null, any help?
thanks again,
Phil
On Aug 31, 12:06 am, Jorge Godoy <jgo...@gmail.com> wrote:
> I'd math the regex "\d+$", i.e., I'd get numbers at the end of the value.
>
> Then you could operate on the matched value.
>
> --
> Jorge Godoy <jgo...@gmail.com>
>
> On Sun, Aug 30, 2009 at 19:29, Phil <pjwhitehea...@googlemail.com> wrote:
>
> > In jQuery how do I remove a certain part of an id...
>
> > for example i have a div id='thisisadiv_1'
> > I want to remove the 'thisisadiv_' part
> > This is so I can add/subtract 1 to switch divs.
>
> > Thanks in Advance.
> > Phil.
No comments:
Post a Comment