Jump to content

[SOLVED] regex :S


jk11uk

Recommended Posts

regex is new and very confusing to me so any help is much appreciated.....

 

 

i need to check if the first 4 values in a string equal ABCD. how do i do this? i think i have to use regex

 

 

 

for example,

$stringY = "abcdef";

$stingX="abcfgfgr";

 

////need to be able to output only $stringY

 

if(string starts with abcd)

{

echo string

}

 

 

 

thanks

 

Link to comment
https://forums.phpfreaks.com/topic/89330-solved-regex-s/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.