+ 4
Quiz time 2
Create a program that Count s the number of special characters (all chars excluding alphabets, numbers, space) in the string eg; input: hurray!!, I got a fancy mail_ID 100%@gmail.com output : 7 // i.e; ! - first spl char !- second spl char , - third spl char _- fourth spl char %- fifth spl char @ -sixth spl char . - seventh spl char so the output is 7đ
12 Respostas
+ 7
https://code.sololearn.com/WkcdB2fY0m0z/?ref=app
+ 6
g stands for global search
match the entire string rather than just the first occurance
https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions
+ 3
@ offline
your code is great you made the code in the similar way i thoughtđđđđ
+ 2
@ Burey
what does that "/g" stands for? (in line 23)
+ 2
you can check for existence of any char:
https://code.sololearn.com/wV3kfFNbhdFf/#php
+ 2
thnx @ burey
i have created another quiz too check it outđ
https://www.sololearn.com/discuss/433841/?ref=app
+ 2
hey, click this link for finding the special symbols with optimal code. Enjoyđ
https://code.sololearn.com/c52DrXK5nRim/?ref=app
+ 1
Java:
text.split("[^a-zA-Z0-9 \t]").length - 1;
+ 1
@Hemant
Congo manđ
0
thanks bro