I have a line of text:
"my automobile is running well"
I want to use reg. expressions to match "auto" in automobile and to produce new variable which will have matching string.
I thought I can do something like this:
myvar = grep (/auto/, $2)
(after above myvar="auto")
but, it's not working.
Thanks for any help.
"my automobile is running well"
I want to use reg. expressions to match "auto" in automobile and to produce new variable which will have matching string.
I thought I can do something like this:
myvar = grep (/auto/, $2)
(after above myvar="auto")
but, it's not working.
Thanks for any help.