enjama
asked on
Powershell or Regex?
Hi people -
Just curious -
look at the following expression in powershell. Why does this return true? I believe the limit here is 3, NO?
"8888888888888888888" -match "[0-9]{0,3}"
Just curious -
look at the following expression in powershell. Why does this return true? I believe the limit here is 3, NO?
"8888888888888888888" -match "[0-9]{0,3}"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
"888-367-1240" -match "[0-9]{3,3}-[0-9]{3}-[0-9]
to
"888-367-1240" -match "^[0-9]{3,3}-[0-9]{3}-[0-9
and it now works properly. Thank you!