Jump to content

Find a string, at the beginning of a string


aximbigfan

Recommended Posts

Sorry if this is not the right forum, dunno if this fit under RegExp or not.

 

Basically, I need a function to see if the beginnign of a string matches another string.

 

Let's say

$match = '/1/2/3/';

 

and the haystack is '1/2/3/4/5'. In this case, the function would return true, but in this case

haystack: '2/3/1/2/3' the function would return false.

 

Thanks,

Chris

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.