You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Aliaksandr Yermakovich <Al...@epam.com> on 2006/02/10 13:48:15 UTC
regular expression extractor
Hi All,
I'm trying to get number 300012 from the following string:
<td width="90"><input type="button" value="Edit User" onclick="setFormValue
('edit', '300012')"></td>
And I use the following expression, but it doesn't work:
<td width="90"><input type="button" value="Edit User" onclick="setFormValue
('edit', '(.+?)')"></td>
Could somebody say me, what's wrong and which's correct sytax.
Thanks in advance.
Best Regards,
Alex
Re: regular expression extractor
Posted by Peter Jasovsky <pj...@tucows.com>.
yep, or try:
<td width="90"><input type="button" value="Edit User"
onclick="setFormValue('edit', '\d*')"></td>
sebb wrote:
> On 10/02/06, Aliaksandr Yermakovich <Al...@epam.com> wrote:
>> Hi All,
>>
>> I'm trying to get number 300012 from the following string:
>>
>> <td width="90"><input type="button" value="Edit User" onclick="setFormValue
>> ('edit', '300012')"></td>
>>
>> And I use the following expression, but it doesn't work:
>>
>> <td width="90"><input type="button" value="Edit User" onclick="setFormValue
>> ('edit', '(.+?)')"></td>
>>
>> Could somebody say me, what's wrong and which's correct sytax.
>
> ( is a meta-character - it needs to be escaped if standing for itself.
>
> Rather than using ".", digits can be matched with "\d".
>
> The last part of the RE should be:
>
> \('edit', '(\d+?)'\)"></td>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: regular expression extractor
Posted by sebb <se...@gmail.com>.
On 10/02/06, Aliaksandr Yermakovich <Al...@epam.com> wrote:
> Hi All,
>
> I'm trying to get number 300012 from the following string:
>
> <td width="90"><input type="button" value="Edit User" onclick="setFormValue
> ('edit', '300012')"></td>
>
> And I use the following expression, but it doesn't work:
>
> <td width="90"><input type="button" value="Edit User" onclick="setFormValue
> ('edit', '(.+?)')"></td>
>
> Could somebody say me, what's wrong and which's correct sytax.
( is a meta-character - it needs to be escaped if standing for itself.
Rather than using ".", digits can be matched with "\d".
The last part of the RE should be:
\('edit', '(\d+?)'\)"></td>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org