javascript regex multiple matches into a javascript array
Posted: Tue Apr 17, 2007 6:43 pm
Hi all
My first post so bare with me!
This is a javascript question
Is it possible to use regex in a form to match the first match then behind the scenes. Match all occurrences (there could be like many identical matches) and copy them into a javascript array feeding them into a pull down form.
(AJAX style)
so say a regex of
123(.*)abc
with content like this
123Eabc
123Fabc
123Gabc
123Habc
123Iabc
The javascript array would contain
0->E
1->F
2->G
3->H
4->I
Then these results displayed in a pulldown form
Any help or advice (or even solution would be most appreciated)
Thanks
My first post so bare with me!
This is a javascript question
Is it possible to use regex in a form to match the first match then behind the scenes. Match all occurrences (there could be like many identical matches) and copy them into a javascript array feeding them into a pull down form.
(AJAX style)
so say a regex of
123(.*)abc
with content like this
123Eabc
123Fabc
123Gabc
123Habc
123Iabc
The javascript array would contain
0->E
1->F
2->G
3->H
4->I
Then these results displayed in a pulldown form
Any help or advice (or even solution would be most appreciated)
Thanks