look behind for this REGEX?
im putting the delimiter i want to split by in caps just so they will stand out code should search for upper or lowercase
$ReadStr = 'asbhd dbshd ABC/DEF sdjfhjskjhfh hfjhd fkj GHI/JKL sdhjkjhfg';
this is what I have...
$SplitStr = preg_split("[开发者_JAVA技巧.../+...]",$ReadStr);
print_r($SplitStr);
would output:
asbhd dbshd
sdjfhjskjhfh hfjhd fkj
sdhjkjhfg
just not sure how to implement the look behind the same exact regex expression...
this is the output i'm looking for:
asbhd dbshd
ABC/DEF sdjfhjskjhfh hfjhd fkj
GHI/JKL sdhjkjhfg
Use a look-ahead instead:
/(?=...\/+...)/
Or to be more specific:
/(?=[a-z]{3}\/+[a-z]{3})/i
精彩评论