How to count numbers of commas in a string
up vote
0
down vote
favorite
Could you please a help me with a regex that can count the numbers of commas in a string, and than add 1.
Excample og a string:
1,2,1,5,4
The result is: 4 commas + 1 = 5
Thank you
count
New contributor
add a comment |
up vote
0
down vote
favorite
Could you please a help me with a regex that can count the numbers of commas in a string, and than add 1.
Excample og a string:
1,2,1,5,4
The result is: 4 commas + 1 = 5
Thank you
count
New contributor
Welcome to SO. Please have a look at: stackoverflow.com/help/how-to-ask
– tod
22 hours ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Could you please a help me with a regex that can count the numbers of commas in a string, and than add 1.
Excample og a string:
1,2,1,5,4
The result is: 4 commas + 1 = 5
Thank you
count
New contributor
Could you please a help me with a regex that can count the numbers of commas in a string, and than add 1.
Excample og a string:
1,2,1,5,4
The result is: 4 commas + 1 = 5
Thank you
count
count
New contributor
New contributor
New contributor
asked 22 hours ago
Jesper L. V. Jacobsen
1
1
New contributor
New contributor
Welcome to SO. Please have a look at: stackoverflow.com/help/how-to-ask
– tod
22 hours ago
add a comment |
Welcome to SO. Please have a look at: stackoverflow.com/help/how-to-ask
– tod
22 hours ago
Welcome to SO. Please have a look at: stackoverflow.com/help/how-to-ask
– tod
22 hours ago
Welcome to SO. Please have a look at: stackoverflow.com/help/how-to-ask
– tod
22 hours ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Jesper L. V. Jacobsen is a new contributor. Be nice, and check out our Code of Conduct.
Jesper L. V. Jacobsen is a new contributor. Be nice, and check out our Code of Conduct.
Jesper L. V. Jacobsen is a new contributor. Be nice, and check out our Code of Conduct.
Jesper L. V. Jacobsen is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53408095%2fhow-to-count-numbers-of-commas-in-a-string%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to SO. Please have a look at: stackoverflow.com/help/how-to-ask
– tod
22 hours ago