Module url-open.modules.patterns
Provides default patterns to match urls
Tables
PATTERNS | Default patterns to match urls |
Fields
DEEP_PATTERN | Deep Pattern to match URLs from text. |
Tables
- PATTERNS
-
Default patterns to match urls
Fields:
- pattern string : Pattern to match urls (required)
- prefix string or nil : Prefix to add to the url
- suffix string or nil : Suffix to add to the url
- file_patterns table, string or nil : File patterns to match against
- excluded_file_patterns table, string or nil : File patterns to exclude
- extra_condition function(pattern_found), boolean or nil : A callback function will be called with the pattern found as argument. If the function returns false, the pattern will be ignored. If the function returns true, the pattern will be used.
Fields
- DEEP_PATTERN
-
Deep Pattern to match URLs from text. This pattern will find URLs in various formats. Supported URL formats:
- http://example.com
- https://www.example.com
- ftp://ftp.example.com
- file:///path/to/file.txt
- ssh://user@hostname
- git://github.com/user/repo
- http://example.com/path?param=value
- https://www.example.com/another/path#section
- http://example.com:8080
- https://www.example.com:8443
- ftp://ftp.example.com:2121