2020-11-20 21:09:12 +00:00
|
|
|
/**
|
|
|
|
* capture anything starting with http:// or https://
|
|
|
|
* https?:\/\/
|
|
|
|
*
|
|
|
|
* up until a disallowed character or whitespace
|
|
|
|
* [^"<>\\^`{|}\s]+
|
|
|
|
*
|
|
|
|
* and a disallowed character or whitespace, including non-ending chars .,:;!?
|
|
|
|
* [^"<>\\^`{|}\s.,:;!?]
|
|
|
|
*/
|
|
|
|
export const linkRegex = /(https?:\/\/[^"<>\\^`{|}\s]+[^"<>\\^`{|}\s.,:;!?])/g;
|
2020-11-16 18:09:15 +00:00
|
|
|
export default { linkRegex };
|