blob: 122f23a5bb572522fcfb773ecd5e68b3fc90b168 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/**
* 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;
export default { linkRegex };
|