Обрезка по строке ','// через функцию explode

251
27 мая 2017, 19:32

Не могу обрезать строку по строке ','// (апостроф, запятая, апостроф, два слэша). Делаю так

$hurls = explode("\\',\\'//", $subg);

Сама строка

s1.afisha-eda.ru/StaticContent/Photos/120131082911/130725174021/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131082850/120213184522/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131083043/120213184522/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083434/120213184523/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131083110/120213184523/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131083215/120213184523/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083410/120213184523/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131082911/120213184522/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/130619134157/130629173151/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131082957/120213184522/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120213180404/140604085101/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140823083249/140902212000/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120213184952/140725140850/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082729/140228161620/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131083136/120213184523/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131111357/130402194805/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083243/120213184523/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131082933/120213184522/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140227144100/140308233938/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140612200952/140619203848/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120214125956/120912232809/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/131014225425/131027223941/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082618/120424121630/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082650/140228161542/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120515204458/120528182603/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120214133254/151005124359/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140524182915/140530234844/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/110816125054/121125174910/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120213182735/140127190045/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140227144100/140306023225/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/130104145234/140411182951/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140622144901/140626201352/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120329181829/140411071846/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083215/130331201508/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/110810174633/140424121422/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131083347/120213184523/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/121004175948/130826171719/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/121208021522/150330131434/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/150601195903/150611205918/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131083043/120805154609/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/150206102918/150214225711/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140812180013/140819011913/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/141111211643/141120001436/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131090424/150716194732/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/141111211643/141120164545/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/121102151737/121111133054/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/130116161736/131210231739/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140612200952/140620003515/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160201161818/160209104502/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083347/150308164412/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140524182915/140531012554/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140219152153/141116131808/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/150317164033/150324163736/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140209110544/140218215154/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140310151157/140320121541/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/130924160547/131003030027/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/131014225425/131027223924/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/131127180426/131205001925/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140310151157/140317121353/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131111838/130403013152/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120605145344/120703164346/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083308/120213184523/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083019/120213184522/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/110808212803/140613151325/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140201143522/140208173411/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140310151157/140317155824/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120213180745/140905123524/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160302171541/160309214045/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/130924160547/150823202309/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160302171541/160309160802/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140310151157/140319100241/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120214131251/140314165015/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120214130615/140314164949/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120213175333/140313153953/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140201143522/140209001425/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140111190442/140123212921/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/i/130328102902/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/121010154332/121012153530/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120803113558/120813115622/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083619/120213184524/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131083524/120213184524/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/141111211643/141121081504/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/141101010214/141109155525/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/130128172303/140917195827/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140902214744/140913211800/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140902214744/140912105218/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140902214744/140912105134/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140823083249/140828235836/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140823083249/140831142747/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140504151741/140826192822/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140512112357/140826192824/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140524182915/140530151407/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140408181639/140416122458/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140408181639/140413211342/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120214142532/150201114449/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120504214259/150310145240/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/140612200952/150322115509/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/150819165228/150825164840/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/150412162041/150416191610/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131083347/150515183901/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/170122183544/170208175511/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/161211222131/161226205421/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/161026181903/161108215730/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/131113183908/161114185303/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160217102653/160324211842/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131090424/160329162626/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131085017/160322120820/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160302171541/160309214025/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160223102951/160228124039/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160302171541/160308162217/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160217102653/160221202255/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160217102653/160221202410/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160217102653/160221202403/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160217102653/160221115831/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160201161818/160208124832/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131090202/160202212429/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/150819165228/160119063756/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/150810204910/160118233606/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131085657/160116161526/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/110816122019/160105175655/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131082342/151224085029/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/141122084325/151129151747/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/141101010214/151129145708/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/151124224236/151124224236/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131111357/151013224449/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082242/151002171834/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120213175531/150912074850/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/150108085750/150408233928/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/140714125349/150322144927/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/130212102403/151006040524/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120131082709/150921180850/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/150819165228/150825164835/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/131004132748/150823202311/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/131207233339/150726205800/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/150707173742/150711131427/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/150326170337/150403163552/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/110816121851/150326211817/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131083649/150308195353/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131085552/150216230655/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120213185439/150201052337/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120213175022/160503131911/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160501120547/160509080727/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160525131253/160602185928/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160525131253/160603112540/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/160525131253/160606174201/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120922220520/160611230137/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160620142952/160629163258/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160704095203/160713064002/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/160717170530/160723220701/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/120214132605/160801213539/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082527/160822233426/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082543/160822233426/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082601/160822233427/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/150819165228/160921084912/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/161012201757/161022232609/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/161125164152/161206211827/p_O.jpg','//s1.afisha-eda.ru/StaticContent/Photos/161125164152/161211190517/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120214125956/170107152557/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082151/170411001911/p_O.jpg','//s2.afisha-eda.ru/StaticContent/Photos/120131082509/170513201106/p_O.jpg

Желаю получить все ссылки обрезав этот злосчастный сепаратор

Answer 1
$hurls = explode("','//", $subg);

test

Answer 2

В твоем случае нужно экранировать только двойные кавычки. А их нет. Значит ничего тебе экранировать не нужно.

READ ALSO
Уменьшить нагрузку на сервер через Sleep()

Уменьшить нагрузку на сервер через Sleep()

ВопросЕсли делать искусственную паузу после каждого запроса, например:

309
Соединить 4 таблицы mysql

Соединить 4 таблицы mysql

Как можно отобразить 4 таблицы mysql в одной html на php странице? Например есть 4 таблицы general, class, atribute, dannyeНадо чтобы они всю инфу выводили в 1 общую

274
Как в simple-html-dom получить реальный URL?

Как в simple-html-dom получить реальный URL?

Например, эта ссылка в браузере открывается "как есть"https://eda

306
Установка ssh2 php на Freebsd

Установка ssh2 php на Freebsd

Доброе время сутокУстанавливаю библиотеку ssh2 для php на ОС Freebsd

235