summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/jobs/utils.js
blob: 1ccecf3eb53d893e996abebc3344093a8d633cf0 (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 };