Click here to Skip to main content
15,881,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want regex expression that find special character in between number for e.g 78459&*#$@$$<><85
above number contain special character in between number . i want regex that checked 8 digit number along with special character

What I have tried:

i try \d{8} this regex but it only checked number not special character inbetween number
Posted
Updated 15-Jan-20 1:09am

You can match any non-digit characters with [^\d]+.
 
Share this answer
 
Comments
Akshay malvankar 16-Jan-20 4:45am    
i ddidnt get you can you explain i want to match 10 digit number with speical character from string e.g "njkdahfkjdh dafjfidjjfd djfld 2468484&&&&(&777799"

i want to chekcked this number with speical charater from string
phil.o 16-Jan-20 4:56am    
\d+[^\d]+\d+
8 digits in your question, 10 digits in your comment, and your example holds 13 of them... Makes it really complicated to know what you are really up to.
Akshay malvankar 16-Jan-20 5:15am    
see listen i want experssion that match 10 digit number with speical character from string ok

for e.g :" abc abc abc 78965478596"
and e.g " "abc abc abc 78525$%%%$152425"

mtach both above experssion
phil.o 16-Jan-20 5:21am    
Both these expressions hold 11 digits, not 10. Should they match?
Akshay malvankar 16-Jan-20 5:33am    
k bro

7859632596
7485$$%#$%85695

this fine to you
bro 10 digit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900