Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery
Donni Gun..
taking array number
in
Using jQuery
•
6 years ago
Hi, i have a input form in array, I'm wondering if it possible to take the array number of form name, let say <input type="text" name="text[33]">
is there a way to take the 33 from that form name? thanks a lot
1
Reply
Replies(7)
jakecigar
Re: taking array number
6 years ago
Lets say el is the input element.
var num = el.name.replace(/[^\d]/g, "")
http://jsfiddle.net/jakecigar/aw30qorr/
<--
JΛ̊KE
Donni Gun..
Re: Re: taking array number
6 years ago
Jake, thanks a lot..
anyway what is that "/[^\d]/g" ? where to learn more about it?
Leave a comment on jakecigar's reply
jakecigar
Re: taking array number
6 years ago
That’s a
regular expression
that matches anything that is not a digit. They are replaced by "" leaving just the digits.
regular expression
are documented in a
gazillion
places on the internet.
JΛ̊KE
Leave a comment on jakecigar's reply
kbwood.au
Re: taking array number
6 years ago
You could probably just use:
/\d/g
jakecigar
Re: Re: taking array number
6 years ago
No.
I replaced everything that is NOT a number with "".
I could have use \d* to find the digits with match, then pop the resultant array. But it would have been more error prone and a lot longer.
JΛ̊KE
Leave a comment on kbwood.au's reply
kbwood.au
Re: taking array number
6 years ago
My mistake, it
should have been
/\D/g
jakecigar
Re: Re: taking array number
6 years ago
That would do it!
JΛ̊KE
Leave a comment on kbwood.au's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to Donni Gunawan's question
Top
Reply
{"z39139380":[14737000006057364,14737000006057369],"z2953500":[14737000006060749,14737000006060751],"z2950240":[14737000006059343,14737000006059349,14737000006061735,14737000006061737]}
Statistics
7
Replies
1554
Views
1
Followers
Tags
Cancel
array
Actions
Permalink
Related Posts
=== '[object Array]'
maybe array ...
JSON array
.siblings() array?
array datepicker
Array