Sublime Text
- 3 ответа
- 0 вопросов
6
Вклад в тег
"channels":
[
"https://packagecontrol.io/channel_v3.json",
"https://web.archive.org/web/20160103232808/https://packagecontrol.io/channel_v3.json",
"https://gist.githubusercontent.com/nick1m/660ed046a096dae0b0ab/raw/e6e9e23a0bb48b44537f61025fbc359f8d586eb4/channel_v3.json"
],
"channels":
[
"https://packagecontrol.io/channel_v3.json",
"https://web.archive.org/web/20150905194312/https://packagecontrol.io/channel_v3.json"
],
https:\/\/twitter\.com\/(.+)$
$subject='https://twitter.com/durov';
$regexp='%https:\\/\\/twitter\\.com\\/(.+)$%';
// если любой url подобного рода, то
//$regexp='%[fhtps]{3,5}:\\/\\/[^\\/]+?\\/(.+)$%'
echo $result = preg_replace($regexp, '\\1', $subject);
var subject='https://twitter.com/durov';
var result = subject.replace(/https:\\/\\/twitter\.com\\/(.+)$/g, "\\1");
console.log(result);