Jump to content

New to regex


ninedoors

Recommended Posts

I need to separate a string that holds information about a location on a warehouse floor.

 

A sample string would be: 15B3

 

So that the '15' is tells me what bin location the product is in, the 'B' tells me the level of the racking it is on, and the '3' tells me where in that rack it is located.

 

So what I need to do is separate this string when I get it out of a database so that I would have an array like array(15, B, 3) or some form of an array that I can get at each part.

 

The string will always have the form of number string, letters string, number string.  Like I said I am a newbie with regex so any help would be great.

 

Looking thru what I have thru google, I looks like I would need something that looks for a group of digits or a group of alphas and returns it if found.

 

Thanks Nick

Link to comment
https://forums.phpfreaks.com/topic/192935-new-to-regex/
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.