Click here to Skip to main content
14,422,431 members
Rate this:
Please Sign up or sign in to vote.
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 4 days ago
Rate this:
Please Sign up or sign in to vote.

Solution 2

You can match any non-digit characters with [^\d]+.
   
Comments
Akshay malvankar 3 days ago
   
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 3 days ago
   
\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 3 days ago
   
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 3 days ago
   
Both these expressions hold 11 digits, not 10. Should they match?
Akshay malvankar 3 days ago
   
k bro

7859632596
7485$$%#$%85695

this fine to you
bro 10 digit
phil.o 3 days ago
   
\d+[^\d]+\d+
Rate this:
Please Sign up or sign in to vote.

Solution 1

   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100