jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: use of regular expression
Date Fri, 31 Mar 2006 16:47:01 GMT
On 31/03/06, Raffaele Viola <raffovi@gmail.com> wrote:
> Thanks,
> the problem is that in the response I vave more than expression like
> <value>1</value>
> what distinguish the expression is the name between <name> and </name>
>
> can I use an expression like that:
>
> <name> name of value </name><value> (\d*) </value>

Yes - try it and see - but remember spaces are significant, so you probably want

<name>name of value</name><value>(\d+)</value>

I changed \d* to \d+ to ensure that you get at least one digit.


>
> thanks!
>
> -Raffo
>
>
>
>
>
> On 3/31/06, Frehe, Torsten <Torsten.Frehe@txb.de> wrote:
> >
> > Hi,
> >
> > I think you could use an regular expression extractor like this:
> >
> > Reference name: name of your new variable
> > Regular expression : (<value>([^<]*))
> > Template : $2$
> > Match No.: 1
> >
> > The you get the 1 into your variable
> >
> > Reference name: name of your new variable
> > Regular expression : (<value>([^<]*))
> > Template : $2$
> > Match No.: 2
> >
> > You get "getGrantaccessError" in your variable.
> >
> >
> > To use the variable in the next request use ${variable}
> >
> > Torsten
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Raffaele Viola [mailto:raffovi@gmail.com]
> > Gesendet: Freitag, 31. März 2006 13:13
> > An: JMeter Users List
> > Betreff: use of regular expression
> >
> >
> > Hi all,
> >
> > I have this type of response form the server and I need to catch the value
> > between  <value> and </value> and put the value in a variable.
> >
> > How can I do?
> >
> > <method>
> > <name>Unknown</name>
> > <object>Unknown</object>
> > <attributeme>returnValue</name><value>1</value></attribute>
> >
> > <attribute><name>returnComment</name><value>getGrantaccessError</value></attribute>
> > </method>
> >
> > thanks a lot!!!!
> >
> > -Raffo
> >
> >
> > ******************************************************************
> > Bitte nutzen Sie die E-Mail-Verbindung mit uns ausschliesslich zum
> > Informationsaustausch. Wir koennen auf diesem Wege keine
> > rechtsgeschaeftlichen Erklaerungen (Auftraege etc.) entgegennehmen.
> > Der Inhalt dieser Nachricht ist vertraulich und nur fuer den angegebenen
> > Empfaenger bestimmt. Jede Form der Kenntnisnahme oder Weitergabe
> > durch Dritte ist unzulaessig. Sollte diese Nachricht nicht fur Sie
> > bestimmt
> > sein, so bitten wir Sie, sich mit uns per E-Mail oder telefonisch in
> > Verbindung zu setzen.
> >
> > Please use your E-mail connection with us exclusively for the exchange
> > of information. We do not accept legally binding declarations (orders,
> > etc.) by this means of communication. The contents of this message is
> > confidential and intended only for the recipient indicated. Taking
> > notice of this message or disclosure by third parties is not
> > permitted. In the event that this message is not intended for you,
> > please contact us via E-mail or phone.
> >
> > ******************************************************************
> >
> >
> > ---------------------------------------------------------------------
> > 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


Mime
View raw message