reg expr: match a string A-Z, a-z, * or a blank ( but string can not be all blanks)
I need to match a string that can contain an A-Z, a-z, * or a blank
( but the string can not be all blanks)... Is my attempt correct? if (string not like "%[^A-Za-z* ]%") begin //do something end |
Code:
#!/usr/bin/env bash |
is there anything on the lines of
if (string not like "%[^A-Za-z* ]%") begin //do something end |
show some examples of those strings, the correct matches , and the incorrect matches.
|
FOLLOWING SHOULD PASS:
"this is my string" "**" FOLLOWING SHOULD FAIL: "this is 908 string" " " ( an all blank string) IN GENERAL: A valid string will contain values A-Z, a-z, one or more blanks or an asterisk ( "*"). But string can not be all blank. |
All times are GMT -5. The time now is 02:02 PM. |