Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Please help, i need a regex to "VARCHAR(ONLYNUMBERSHERE)"

string a = "VARCHAR(12)"

REGEX:

@"VARCHAR([0-9]{1,5})" doesn't working
Posted
Updated 7-Nov-13 23:56pm
v2
Comments
CodeBlack 8-Nov-13 5:49am    
can you post code which you have tried and not working ?
Rieth L 8-Nov-13 5:56am    
posted
Raajkumar.b 8-Nov-13 6:06am    
can you give an example what do you want in output?
Raajkumar.b 8-Nov-13 6:10am    
ValidationExpression="^[0-9]*$"
this regex is only for numbers with no spaces and characters

1 solution

Use below regular expression :

C#
@"VARCHAR\(([0-9]{1,5})\)"
 
Share this answer
 
Comments
Rieth L 8-Nov-13 7:17am    
Thanks it work
CodeBlack 8-Nov-13 7:19am    
don't forget to rate this solution.

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