To start off, here's the regex:
Btw this is part of a while loop that loops through a .txt (hence the %i)
$regsub(%a,/\b $gettok($read(hs.txt,%i),1,32)\b/g,$chr(32) $gettok($read(hs.txt,%i),2-,32),%a)
Now, I have a .txt, which has lines similar to the following:
Line1 Blah Blah Blah
24 123 123 123
The regex replaces Line1 with Blah Blah Blah (I use it as a command later).
So for example:
Hi there 24
When passed through the regex, comes out to be:
Hi there 123 123 123
The problem is if the word needed to be replace is the FIRST word. e.g.
Line1 Hi there 24 Line1
When passed through, comes out
Line1 Hi there 123 123 123 Blah Blah Blah
As you see it replaces other text, but NOT the first word. Any help?