Jump to content

need help with function to find 6 digit numeric string


jeffj

Recommended Posts

I need to parse a string and attempt to find a substring in the string that contains 6 numeric digits. the first and last digit may or may not be preceded by a space.

 

I need to find the starting the ending positions of the 6 numeric digits to that I can extract the string and build an href containing the string and replace those 6 digits with a hyperlink.

 

can someone help me...

 

thanks in advance.

 

Jeff

Are the 6 numeric characters the same all the time?

 

if they are always the same characters you can use something like this.

if (stristr($string, "6numericCharacters") !== FALSE) {
      //whatever you wanted to do to the string that contains the 6 numbers
}

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.