From: Stephen None Date: 2010-03-23T03:28:00+09:00 Subject: splitting text string I am working on a way to process the status of products and I want to use a bar code reader to make things easier. I already have the scanner which simply reads the bar code into the keyboard port and appends a carriage return. I was thinking of printing bar codes that would contain information which is useless externally but useful to my app. For instance... Bar code: 123456789 Which would break down into: order (first three) => 123 product (next five) => 45678 status (last digit) => 9 I would then use a nested form to feed the information in the database. My question is... I get the string from the barcode reader as one long string of numbers with no delimiters so how do I break that string down? I can make sure the position of the values is the same in the barcode when we print them but split and chunk both want a delimiter. Thanks, stephen -- Posted via http://www.ruby-forum.com/.