Jump to content

find an unspecific substring


robcrozier

Recommended Posts

Hi, i wonder if anyone could tell me how i could find a non specific substring of a given string.  Basically i want to find a 5-digit integer value within a long string.  I know that there will only be one 5-digit integer within the string so i suppose this makes it possible, i'm just not sure how to go about it?

 

I know that substr() will work if you know what the substring actually is (i.e '12345' as oppose to a 5-digit unspecified integer)

 

Any suggestion would be great as it's doing my head in.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/86483-find-an-unspecific-substring/
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.