KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to check whether a variable is exactly two numbers but I can not seem to figure it out. How do you do check regular expressions (regex) in KornShell (ksh)? I have tried: if [[ $month =~ "[0-9]{2}" ]] if [[ $month = _[0-9]{2}_ ]] I have not been able to find any docs on it. Any insight?
Tags (comma-separated)
Save Edits
Cancel