R
Robert Crandal
I'm still a newbie at all this regular expression stuff, so forgive
this newb question....
My input data strings have the following format:
"Item1 scissors"
"Item2 notebooks"
"I3 pens"
"itm4 keyboards"
......
So, each line is basically formatted like this:
[string of characters] [several whitespace(s)] [string of characters]
Using regular expressions, how can I store each pair of items in
separate variables??
For example, if I read in the first line above,
I would like my variable sNum to store the "Item1" string, and a
variable named sObj would store "scissors". I guess I'm really
trying to parse each pair of items and store them in variables
using regular expressions, but I don't fully understand how to
create my own regular expression pattern strings yet.
Thanks!
this newb question....
My input data strings have the following format:
"Item1 scissors"
"Item2 notebooks"
"I3 pens"
"itm4 keyboards"
......
So, each line is basically formatted like this:
[string of characters] [several whitespace(s)] [string of characters]
Using regular expressions, how can I store each pair of items in
separate variables??
For example, if I read in the first line above,
I would like my variable sNum to store the "Item1" string, and a
variable named sObj would store "scissors". I guess I'm really
trying to parse each pair of items and store them in variables
using regular expressions, but I don't fully understand how to
create my own regular expression pattern strings yet.
Thanks!