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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.