3 changed files with 19 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||
import Parser from './parser'; |
|||
import regex from './regex'; |
|||
|
|||
// Factory function to return parser instance
|
|||
const Urls = (text = null) => new Parser(text); |
|||
|
|||
// Expose regex here for easy access
|
|||
Urls.regex = regex; |
|||
|
|||
export default Urls; |
@ -0,0 +1,8 @@ |
|||
// Factory function to return parser instance
|
|||
export default class Urls { |
|||
|
|||
constructor(text = null) { |
|||
this.text = text; |
|||
} |
|||
|
|||
} |
@ -0,0 +1 @@ |
|||
export default /(([^\s,]*\.(com|ninja))|(?:[0-9]{1,3}\.){3}[0-9]{1,3})(:[0-9]+)?(\/([^\s,.]*)?)?(?=[\s,.]|$)/g; |
Loading…
Reference in new issue