This is almost certainly something really silly that I've overlooked but I'm stumped. The following C# style expression is supposed to match phones numbers (a limited subset of them, but this is just testing...):
^[0-9]{3}-[0-9]{3}-[0-9]{4}$
The search string is as follows:
978-454-0586\r\nother junk\r\nmore junk\r\nhttp://www.google.com\r\n
The expression matches the phone number when in isolation, however not when next to other stuff. For example, if I lop off everything after the phone it works just great.
How can I modify the expression so that it matches the phone number and doesn't get hung up on the rest of the junk?
Thanks!