Thank you! It does work!! Best regards, Alex Y.
-----Original Message----- From: sebb [mailto:[EMAIL PROTECTED] Sent: Monday, February 13, 2006 3:50 AM To: JMeter Users List Subject: Re: regular expression extractor On 10/02/06, Aliaksandr Yermakovich <[EMAIL PROTECTED]> wrote: > Hi, > > I've got a little bit complicated case. I need to recognize this number > after [EMAIL PROTECTED] > I got the following hmtl: > > Email: [EMAIL PROTECTED]</td><td></td> > <td width="90"><input type="button" > value="Edit User" onclick="setFormValue ('edit', '300000023')"></td> > > There is line feed. I tried to use the following, but didn't succeed: > > Email: [EMAIL PROTECTED]</td><td></td>\n<td width="90"><input > type="button" value="Edit User" onclick="setFormValue \('edit', > '(\d+?)'\)"></td> > > Also I feel that it can be much more shorter, I didn't quite know how to do > it. Try: (?s)[EMAIL PROTECTED]'edit','(\d+?)' The (?s) makes . match new-line. The ? after the .+ ensures it stops at the first match. I assume that the first occurence of 'edit' after the e-mail address is the one in the setFormValue call. If not, you will need to add in some more context. You could possibly omit the 'edit' and the comma altogether. > Please, help! > > Thank you advance! > > Best regards, > Alex Y. > -----Original Message----- > From: sebb [mailto:[EMAIL PROTECTED] > Sent: Friday, February 10, 2006 2:52 PM > To: JMeter Users List > Subject: Re: regular expression extractor > > On 10/02/06, Aliaksandr Yermakovich <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME cryptographic signature

