21. Metacharacters - Quantifiers: The Star
- Of course, it's not a very specific regular expression, because it also
matches other things, like "-", and "123-" and "-123" and "1", and also "" - because
everything in the regex is quantified with a star, it will allways succeed! So if
there were lines in the file with something other than phone numbers, this regex
would be way to general for us to use.
- As mentioned before, it would depend on what the
data we were searching was like as to whether this regex would be
suitable or not. (We'll come back to this example again and make it better in a moment.)
|