natefaubion / matches.js

Powerful pattern matching for Javascript
MIT License
772 stars 37 forks source link

Match URLs in a blob of text #1

Closed diclophis closed 12 years ago

diclophis commented 12 years ago

Heya,

Could this library be used to extract URLs from a blob of text?

natefaubion commented 12 years ago

No, not really. You would want to just use regular expressions for that: http://www.google.com/search?q=regex+extract+url

This library is meant to inspect the types and structure of the arguments you pass to a function and respond accordingly. It can match on whether a particular argument is of the String type, or whether it matches a particular string literal.