Created
December 15, 2010 00:07
-
-
Save aki-null/741387 to your computer and use it in GitHub Desktop.
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
// もしキャプチャーグループ1が空でない場合はそれをURLとする。 | |
// そうでない場合はキャプチャーグループ0(全体)をURLとする。 | |
(?<=[\[[\(({{⟨«‘“"'⦅⸨「「『〚⟦〔❲〘〈《⟪<<≪‹【〖]) | |
[^\[[\(({{⟨«‘“"'⦅⸨「「『〚⟦〔❲〘〈《⟪<<≪‹【〖]*? | |
(https?://[^\s\]]\))}}⟩»’”"'⦆⸩」」』〛⟧〕❳〙〉》⟫>>≫›】〗]+) | |
(?=[\]]\))}}⟩»’”"'⦆⸩」」』〛⟧〕❳〙〉》⟫>>≫›】〗]) | |
|https?://[^\s]+(?<![”]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
これでは上手く処理できないケースがあるので、プログラム的にURLをスキャンするプログラムを書きました。 [https://github.com/aki-null/URLScanner]