Yes, you need to be careful of .* and .+ because they are greedy, and will match as much as possible.
By the way, there is no need to escape the single-quote character, so your RE could be rewritten as: lements\['selectedGroup'\]\.value='(.+?)'; S. On 20/04/06, Pavel Gouchtchine <[EMAIL PROTECTED]> wrote: > The problem is in the regular expression. > (.+?) works better and number of GROUPSCOUNT_matchNr is correct now. > > > On 4/20/06, Pavel Gouchtchine <[EMAIL PROTECTED]> wrote: > > Hi All. > > Please help me with the following problem. > > > > I am using regular expression with the such parameters: > > Reference Name: GROUPSCOUNT > > Regular Expression: lements\[\'selectedGroup\'\]\.value=\'(.*)\'; > > Template: $1$ > > Match No: -1 > > Default Value: ERROR_GROUPSCOUNT > > > > At the moment I am running it, total number of groups is 3. > > I have verified manually the regular expression through source code > > and confirmed, that there are only 3 matches. > > The problem is that GROUPSCOUNT_matchNr is 4. > > > > I have set ForEach loop with simple beanShell to verify it and here is > > result: > > > > group --> 081d55580ab7c673010ab80ff1750015 > > group --> 081d55580ab3adb3010ab3af46d40008 > > group --> 081d55580ab7c673010ab80e4a670012 > > group --> > > > > > > > > The last group (number 4) is empty. > > > > Is there a reason, why GROUPSCOUNT is greater by one than actual > > number of matches or I am doing something wrong? > > > > Thank you. > > Pavel > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

