I want to allow the dash -, _, . in the string
$string = "atest-d56hdaff"
If ($string -match "^[a-zA-Z0-9\\_\\-\\.]*$"){
echo "OK"
}
else{
echo "Not Ok"
}
What am I doing wrong?
I want to allow the dash -, _, . in the string
$string = "atest-d56hdaff"
If ($string -match "^[a-zA-Z0-9\\_\\-\\.]*$"){
echo "OK"
}
else{
echo "Not Ok"
}
What am I doing wrong?