Operating System - HP-UX
1753259 Members
5640 Online
108792 Solutions
New Discussion

Re: test so $ANS must start with a numeric or alpha

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: test so $ANS must start with a numeric or alpha

Yes, this pattern does work for all alpha or numeric:
if [[ ${ANS} = +([0-9a-zA-Z]) ]]; then
lawrenzo_1
Super Advisor

Re: test so $ANS must start with a numeric or alpha

ok thanks everyone ...

I'll play around and see what I come up with from your suggestions however all good examples!

Chris.
hello