Basit php regex soru

0 Cevap php

Ben bir dize var:

$uri = "start/test/go/";

Basically I need to know which regular expression and PHP function I can use to match the first item with a forward slash ("/") and remove it from the string. It should also work if the first item is not start and is anything else which might also have a space in it. So all these combination should work:

$uri = "start_my_test/test/go/";
$uri2 = "start my test/test/go/";

Sonra RegEx'in sonra her zaman geri dönmek gerekir:

$newUri = "test/go/";

Oh ve dize diğer tarafı da bir şey olabilir, Yani temelde ben bir eğik çizgi ilk geçtiği önce bir şey silmek istiyorum.

Şerefe

0 Cevap