Count Special Characters in String | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Count Special Characters in String

i want to count special character in emails [email protected] = 7 [email protected] = 6 [email protected] = 5 [email protected] = 6

20th Feb 2020, 11:03 AM
Muhammad Idrees
Muhammad Idrees - avatar
2 Answers
+ 1
From your given example I conclude that task is to count period (.) in substring before @. @ is also special charecter. if you meant to count special charecters then given examples are wrong.
20th Feb 2020, 11:10 AM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 1
Use Preg_match_all
20th Feb 2020, 11:01 PM
shabana idrees