summaryrefslogtreecommitdiff
path: root/resources/src/mediawiki/mediawiki.Uri.loose.regexp
diff options
context:
space:
mode:
Diffstat (limited to 'resources/src/mediawiki/mediawiki.Uri.loose.regexp')
-rw-r--r--resources/src/mediawiki/mediawiki.Uri.loose.regexp22
1 files changed, 22 insertions, 0 deletions
diff --git a/resources/src/mediawiki/mediawiki.Uri.loose.regexp b/resources/src/mediawiki/mediawiki.Uri.loose.regexp
new file mode 100644
index 00000000..300ab3ba
--- /dev/null
+++ b/resources/src/mediawiki/mediawiki.Uri.loose.regexp
@@ -0,0 +1,22 @@
+^
+(?:
+ (?![^:@]+:[^:@/]*@)
+ (?<protocol>[^:/?#.]+):
+)?
+(?://)?
+(?:(?:
+ (?<user>[^:@/?#]*)
+ (?::(?<password>[^:@/?#]*))?
+)?@)?
+(?<host>[^:/?#]*)
+(?::(?<port>\d*))?
+(
+ (?:/
+ (?:[^?#]
+ (?![^?#/]*\.[^?#/.]+(?:[?#]|$))
+ )*/?
+ )?
+ [^?#/]*
+)
+(?:\?(?<query>[^#]*))?
+(?:\#(?<fragment>.*))?