Click here to Skip to main content
15,924,402 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am foreaching a payment details in the bank, I want the regex to find value for example 12345 but not find anything when its 12345-123 or 123456-12345.
When I use \d{4,6}(?!\d{0,2}-\d{3}) expression
It finds 12345 but it also finds 12345 from the expression(123456-12345)
Any ideas?
Posted

1 solution

Why not something like:
(?: )(\d*)((?: )|$)

And you could use Expresso to modify the expression to your needs
 
Share this answer
 
Comments
Soloveikok 19-Jul-13 8:09am    
could you be more specific? I`m sorry for my lazyness

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