jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: help-Regular expression extractor
Date Thu, 13 Sep 2012 20:13:12 GMT
On 13 September 2012 12:14, Flavio Cysne <flaviocysne@gmail.com> wrote:
> Sorry, the example I wrote are wrong because I forgot to escape the slash
> character. See below:

Forward slash - / - is not a regex meta-character and so does not need
to be escaped.

> Location:.*\/(\d+)\s*$
> Location:.*\/(\d+)\p{Punct}?
> Location:.*\/pub\/WS\/(\d+)\s*$
> Location:.*\/pub\/WS\/(\d+)\p{Punct}?
>
> 2012/9/13 Flavio Cysne <flaviocysne@gmail.com>
>
>> If these numbers will always be at the end of the Location URL, you could
>> use this: Location:.*/(\d+)\s*$
>>
>> If is not guaranteed that these number will be in the last part of
>> Location URL, try this instead: Location:.*/(\d+)\p{Punct}?
>>
>> Obs.: I'm considering that there will be only one part of the URL
>> containing numbers. If this is not guaranteed, add part of the URL to the
>> expression, like these:
>>
>> Location:.*/pub/WS/(\d+)\s*$
>> or
>> Location:.*/pub/WS/(\d+)\p{Punct}?
>>
>> This site has also a good variety of Regular Expression example with
>> detailed descriptions: http://www.regular-expressions.info/
>>
>> Hope it helps.
>> Flávio Cysne
>>
>>
>> 2012/9/13 ZK <stevesenior69@gmail.com>
>>
>>> Hi,
>>> for the example you gave the RegEx would be:
>>> http://www\.Test\.org/pub/WS/([\d]+)
>>>
>>> there are plenty of RegEx tutorials on the net, such as:
>>> http://www.zytrax.com/tech/web/regex.htm
>>> http://www.zytrax.com/tech/web/regex.htm
>>>
>>>
>>> ZK
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://jmeter.512774.n5.nabble.com/help-Regular-expression-extractor-tp5714744p5714781.html
>>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>
>>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message