- 追加された行はこのように表示されます。
- 削除された行は
このように表示されます。
!!!文字列の中のURLにリンクをはる String regex = "((https?|ftp)://[0-9a-zA-Z,;:~&=@_'%?+\\-/$.!*()]+)"; String replacement = "<a href='$1' target='_blank'>$1</a>"; return value.replaceAll(regex, replacement);
!!!文字列の中のURLにリンクをはる String regex = "((https?|ftp)://[0-9a-zA-Z,;:~&=@_'%?+\\-/$.!*()]+)"; String replacement = "<a href='$1' target='_blank'>$1</a>"; return value.replaceAll(regex, replacement);