beanshell replace vars, _1, _2, etc... are always 'void'
Submitted by Friday, 7 January, 2005 - 16:18
on
Hi,
I was trying to do some simple text rearranging but the beanshell replace vars that should have been set from the regex replacement values always return 'void'. I tried a simple test that goes like this...
convert this...
v1 sdfsdf v2 zzzzzzz
to this...
v1 zzzzzzz v2 sdfsdf
The search string is v1.*v2.*
The replace string is "v1 " + _2 + " v2 " + _1
Instead of the result I expect, what I get is
v1 void v2 void
What am I doing wrong here?
Thanks,
Scott
My version is 4.2 final.
I was trying to do some simple text rearranging but the beanshell replace vars that should have been set from the regex replacement values always return 'void'. I tried a simple test that goes like this...
convert this...
v1 sdfsdf v2 zzzzzzz
to this...
v1 zzzzzzz v2 sdfsdf
The search string is v1.*v2.*
The replace string is "v1 " + _2 + " v2 " + _1
Instead of the result I expect, what I get is
v1 void v2 void
What am I doing wrong here?
Thanks,
Scott
My version is 4.2 final.