Last active
August 29, 2015 14:23
-
-
Save Xiradorn/af78a62bce34c5ba49d9 to your computer and use it in GitHub Desktop.
RegEx functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* X-Meta Img Auto Recog */ | |
$xir_meta_img = '/(?<xir_img_link>(?:<img (?(?=id)(?<xir_id>id="xir_(?:.*?)")) src="(?<xir_src>(?:(?:(?:http:|https:|)\/\/).*?)(?:\.jpg|\.jpeg|\.png|\.svg|\.gif))" \/>))/'; | |
/* X-Meta Img Auto Recog - Powered */ | |
$xir_meta_img_nospecial = '/(?<xir_img_link>(?:<img (?(?=id)(?<xir_id>id="xir_(?:.*?)")) src="(?<xir_src>(?:(?:(?:http:|https:|)(?:\/\/)(?:[a-zA-Z0-9\.\-\/\%\_\~]+)))(?:\.jpg|\.jpeg|\.png|\.svg|\.gif))" \/>))/'; | |
/* X-Phpbb Seo Auto Recog */ | |
$phpbb_seo_link = '/(?<link>(?:https:|http:)(?:\/\/)(?:[a-zA-Z0-9\.\-\/\%\_\~]+)(?:\.html)(?(?=\#)(?:[\#p]{2}[0-9]+)))/'; | |
/* X-Beautify Link Recog */ | |
$phpbb_seo_shorter_link = '/(?<link>(?:https:|http:)(?:\/\/'.str_replace('/','\/',$forum_path).'/)(?<linkpart>[a-zA-Z0-9\.\-\/\%\_\~]+)(?<ext>\.html))(?(?=\#)(?:[\#p]{2}[0-9]+))/'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment