Jump to content

search keyword


Stooney

Recommended Posts

I'm working on a script that will sort through a text file.  I need to identify each line based on the first few characters.  I need a Regular expression to let me know if a string starts with 'CLIENT ID'.

 

So in short

 

If ($string starts with 'CLIENT ID')

    do stuff

else

    do something else

 

Is there an easier way other than regex by chance?  I'm not too familiar with it yet.

Link to comment
https://forums.phpfreaks.com/topic/100356-search-keyword/
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.