How can I split "Apple 1 & 2" into "Apple 1" and "Apple 2" using regex?

Posted by RasputinJones on Stack Overflow See other posts from Stack Overflow or by RasputinJones
Published on 2010-05-25T15:58:40Z Indexed on 2010/05/25 17:11 UTC
Read the original article Hit count: 160

Filed under:
|

Inputs

Apple 1 & 2
Orange 1, 2 & 3

Desired Outputs

Apple 1
Apple 2
Orange 1
Orange 2
Orange 3

How can I do this using Regex?

© Stack Overflow or respective owner

Related posts about regex

Related posts about normalization