Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The regular expression:
- (?-imsx:((http(v|vh|vhd)?://)?([a-zA-Z0-9\-\_]+\.|)?youtube\.com/watch(\?v\=|/v/|#!v=)([a-zA-Z0-9\-\_]{11})([^<\s]*))|((http(v|vh|vhd)?://)?([a-zA-Z0-9\-\_]+\.|)?youtu\.be/([a-zA-Z0-9\-\_]{11}))|((http(v|vh|vhd)?://)?([a-zA-Z0-9\-\_]+\.|)?metacafe\.com/watch/([a-zA-Z0-9\-\_]{7})/([^<^/\s]*)([/])?)|((http(v|vh|vhd)?://)?([a-zA-Z0-9\-\_]+\.|)?vimeo\.com/([a-zA-Z0-9\-\_]{8})([/])?)|((http(v|vh|vhd)?://)?([a-zA-Z0-9\-\_]+\.|)?liveleak\.com/view(\?i\=)([a-zA-Z0-9\-\_]*))|((http(v|vh|vhd)?://)?([a-zA-Z0-9\-\_]+\.|)?facebook\.com/video/video.php\?v\=([a-zA-Z0-9\-\_]*))|((http(vp|vhp)?://)?([a-zA-Z0-9\-\_]+\.|)?youtube\.com/(view_play_list|playlist)(\?p\=|/v/|#!v=)([a-zA-Z0-9\-\_])([^<\s]*)))
- matches as follows:
- NODE EXPLANATION
- ----------------------------------------------------------------------
- (?-imsx: group, but do not capture (case-sensitive)
- (with ^ and $ matching normally) (with . not
- matching \n) (matching whitespace and #
- normally):
- ----------------------------------------------------------------------
- ( group and capture to \1:
- ----------------------------------------------------------------------
- ( group and capture to \2 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- http 'http'
- ----------------------------------------------------------------------
- ( group and capture to \3 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- v 'v'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vh 'vh'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vhd 'vhd'
- ----------------------------------------------------------------------
- )? end of \3 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured
- pattern will be stored in \3)
- ----------------------------------------------------------------------
- :// '://'
- ----------------------------------------------------------------------
- )? end of \2 (NOTE: because you are using a
- quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \2)
- ----------------------------------------------------------------------
- ( group and capture to \4 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]+ any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (1 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- )? end of \4 (NOTE: because you are using a
- quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \4)
- ----------------------------------------------------------------------
- youtube 'youtube'
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- com/watch 'com/watch'
- ----------------------------------------------------------------------
- ( group and capture to \5:
- ----------------------------------------------------------------------
- \? '?'
- ----------------------------------------------------------------------
- v 'v'
- ----------------------------------------------------------------------
- \= '='
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- /v/ '/v/'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- #!v= '#!v='
- ----------------------------------------------------------------------
- ) end of \5
- ----------------------------------------------------------------------
- ( group and capture to \6:
- ----------------------------------------------------------------------
- [a-zA-Z0-9\- any character of: 'a' to 'z', 'A' to
- \_]{11} 'Z', '0' to '9', '\-', '\_' (11 times)
- ----------------------------------------------------------------------
- ) end of \6
- ----------------------------------------------------------------------
- ( group and capture to \7:
- ----------------------------------------------------------------------
- [^<\s]* any character except: '<', whitespace
- (\n, \r, \t, \f, and " ") (0 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- ) end of \7
- ----------------------------------------------------------------------
- ) end of \1
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- ( group and capture to \8:
- ----------------------------------------------------------------------
- ( group and capture to \9 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- http 'http'
- ----------------------------------------------------------------------
- ( group and capture to \10 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- v 'v'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vh 'vh'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vhd 'vhd'
- ----------------------------------------------------------------------
- )? end of \10 (NOTE: because you are
- using a quantifier on this capture,
- only the LAST repetition of the
- captured pattern will be stored in
- \10)
- ----------------------------------------------------------------------
- :// '://'
- ----------------------------------------------------------------------
- )? end of \9 (NOTE: because you are using a
- quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \9)
- ----------------------------------------------------------------------
- ( group and capture to \11 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]+ any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (1 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- )? end of \11 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \11)
- ----------------------------------------------------------------------
- youtu 'youtu'
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- be/ 'be/'
- ----------------------------------------------------------------------
- ( group and capture to \12:
- ----------------------------------------------------------------------
- [a-zA-Z0-9\- any character of: 'a' to 'z', 'A' to
- \_]{11} 'Z', '0' to '9', '\-', '\_' (11 times)
- ----------------------------------------------------------------------
- ) end of \12
- ----------------------------------------------------------------------
- ) end of \8
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- ( group and capture to \13:
- ----------------------------------------------------------------------
- ( group and capture to \14 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- http 'http'
- ----------------------------------------------------------------------
- ( group and capture to \15 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- v 'v'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vh 'vh'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vhd 'vhd'
- ----------------------------------------------------------------------
- )? end of \15 (NOTE: because you are
- using a quantifier on this capture,
- only the LAST repetition of the
- captured pattern will be stored in
- \15)
- ----------------------------------------------------------------------
- :// '://'
- ----------------------------------------------------------------------
- )? end of \14 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \14)
- ----------------------------------------------------------------------
- ( group and capture to \16 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]+ any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (1 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- )? end of \16 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \16)
- ----------------------------------------------------------------------
- metacafe 'metacafe'
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- com/watch/ 'com/watch/'
- ----------------------------------------------------------------------
- ( group and capture to \17:
- ----------------------------------------------------------------------
- [a-zA-Z0-9\- any character of: 'a' to 'z', 'A' to
- \_]{7} 'Z', '0' to '9', '\-', '\_' (7 times)
- ----------------------------------------------------------------------
- ) end of \17
- ----------------------------------------------------------------------
- / '/'
- ----------------------------------------------------------------------
- ( group and capture to \18:
- ----------------------------------------------------------------------
- [^<^/\s]* any character except: '<', '^', '/',
- whitespace (\n, \r, \t, \f, and " ")
- (0 or more times (matching the most
- amount possible))
- ----------------------------------------------------------------------
- ) end of \18
- ----------------------------------------------------------------------
- ( group and capture to \19 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [/] any character of: '/'
- ----------------------------------------------------------------------
- )? end of \19 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \19)
- ----------------------------------------------------------------------
- ) end of \13
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- ( group and capture to \20:
- ----------------------------------------------------------------------
- ( group and capture to \21 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- http 'http'
- ----------------------------------------------------------------------
- ( group and capture to \22 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- v 'v'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vh 'vh'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vhd 'vhd'
- ----------------------------------------------------------------------
- )? end of \22 (NOTE: because you are
- using a quantifier on this capture,
- only the LAST repetition of the
- captured pattern will be stored in
- \22)
- ----------------------------------------------------------------------
- :// '://'
- ----------------------------------------------------------------------
- )? end of \21 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \21)
- ----------------------------------------------------------------------
- ( group and capture to \23 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]+ any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (1 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- )? end of \23 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \23)
- ----------------------------------------------------------------------
- vimeo 'vimeo'
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- com/ 'com/'
- ----------------------------------------------------------------------
- ( group and capture to \24:
- ----------------------------------------------------------------------
- [a-zA-Z0-9\- any character of: 'a' to 'z', 'A' to
- \_]{8} 'Z', '0' to '9', '\-', '\_' (8 times)
- ----------------------------------------------------------------------
- ) end of \24
- ----------------------------------------------------------------------
- ( group and capture to \25 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [/] any character of: '/'
- ----------------------------------------------------------------------
- )? end of \25 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \25)
- ----------------------------------------------------------------------
- ) end of \20
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- ( group and capture to \26:
- ----------------------------------------------------------------------
- ( group and capture to \27 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- http 'http'
- ----------------------------------------------------------------------
- ( group and capture to \28 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- v 'v'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vh 'vh'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vhd 'vhd'
- ----------------------------------------------------------------------
- )? end of \28 (NOTE: because you are
- using a quantifier on this capture,
- only the LAST repetition of the
- captured pattern will be stored in
- \28)
- ----------------------------------------------------------------------
- :// '://'
- ----------------------------------------------------------------------
- )? end of \27 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \27)
- ----------------------------------------------------------------------
- ( group and capture to \29 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]+ any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (1 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- )? end of \29 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \29)
- ----------------------------------------------------------------------
- liveleak 'liveleak'
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- com/view 'com/view'
- ----------------------------------------------------------------------
- ( group and capture to \30:
- ----------------------------------------------------------------------
- \? '?'
- ----------------------------------------------------------------------
- i 'i'
- ----------------------------------------------------------------------
- \= '='
- ----------------------------------------------------------------------
- ) end of \30
- ----------------------------------------------------------------------
- ( group and capture to \31:
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]* any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (0 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- ) end of \31
- ----------------------------------------------------------------------
- ) end of \26
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- ( group and capture to \32:
- ----------------------------------------------------------------------
- ( group and capture to \33 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- http 'http'
- ----------------------------------------------------------------------
- ( group and capture to \34 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- v 'v'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vh 'vh'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vhd 'vhd'
- ----------------------------------------------------------------------
- )? end of \34 (NOTE: because you are
- using a quantifier on this capture,
- only the LAST repetition of the
- captured pattern will be stored in
- \34)
- ----------------------------------------------------------------------
- :// '://'
- ----------------------------------------------------------------------
- )? end of \33 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \33)
- ----------------------------------------------------------------------
- ( group and capture to \35 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]+ any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (1 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- )? end of \35 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \35)
- ----------------------------------------------------------------------
- facebook 'facebook'
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- com/video/video 'com/video/video'
- ----------------------------------------------------------------------
- . any character except \n
- ----------------------------------------------------------------------
- php 'php'
- ----------------------------------------------------------------------
- \? '?'
- ----------------------------------------------------------------------
- v 'v'
- ----------------------------------------------------------------------
- \= '='
- ----------------------------------------------------------------------
- ( group and capture to \36:
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]* any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (0 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- ) end of \36
- ----------------------------------------------------------------------
- ) end of \32
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- ( group and capture to \37:
- ----------------------------------------------------------------------
- ( group and capture to \38 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- http 'http'
- ----------------------------------------------------------------------
- ( group and capture to \39 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- vp 'vp'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- vhp 'vhp'
- ----------------------------------------------------------------------
- )? end of \39 (NOTE: because you are
- using a quantifier on this capture,
- only the LAST repetition of the
- captured pattern will be stored in
- \39)
- ----------------------------------------------------------------------
- :// '://'
- ----------------------------------------------------------------------
- )? end of \38 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \38)
- ----------------------------------------------------------------------
- ( group and capture to \40 (optional
- (matching the most amount possible)):
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_]+ any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_' (1 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- )? end of \40 (NOTE: because you are using
- a quantifier on this capture, only the
- LAST repetition of the captured pattern
- will be stored in \40)
- ----------------------------------------------------------------------
- youtube 'youtube'
- ----------------------------------------------------------------------
- \. '.'
- ----------------------------------------------------------------------
- com/ 'com/'
- ----------------------------------------------------------------------
- ( group and capture to \41:
- ----------------------------------------------------------------------
- view_play_list 'view_play_list'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- playlist 'playlist'
- ----------------------------------------------------------------------
- ) end of \41
- ----------------------------------------------------------------------
- ( group and capture to \42:
- ----------------------------------------------------------------------
- \? '?'
- ----------------------------------------------------------------------
- p 'p'
- ----------------------------------------------------------------------
- \= '='
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- /v/ '/v/'
- ----------------------------------------------------------------------
- | OR
- ----------------------------------------------------------------------
- #!v= '#!v='
- ----------------------------------------------------------------------
- ) end of \42
- ----------------------------------------------------------------------
- ( group and capture to \43:
- ----------------------------------------------------------------------
- [a-zA-Z0-9\-\_] any character of: 'a' to 'z', 'A' to
- 'Z', '0' to '9', '\-', '\_'
- ----------------------------------------------------------------------
- ) end of \43
- ----------------------------------------------------------------------
- ( group and capture to \44:
- ----------------------------------------------------------------------
- [^<\s]* any character except: '<', whitespace
- (\n, \r, \t, \f, and " ") (0 or more
- times (matching the most amount
- possible))
- ----------------------------------------------------------------------
- ) end of \44
- ----------------------------------------------------------------------
- ) end of \37
- ----------------------------------------------------------------------
- ) end of grouping
- ----------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement