jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BAZLEY, Sebastian" <>
Subject RE: Regular expressions again
Date Tue, 08 Jul 2003 16:17:07 GMT
Just happened across the Sun Java regex tutorial:

JMeter does not use Java.util.regex - but I imagine most of the material
will be relevant.

-----Original Message-----
From: BAZLEY, Sebastian 
Sent: 08 July 2003 16:47
To: 'JMeter Users List'
Subject: RE: Regular expressions again

JMeter currently uses Apache ORO (
to handle regular expressions.

These are Perl5 compatible so a Perl book might help, otherwise "Mastering
Regular Expressions" by O'Reilly is recommended in the JavaDoc for JDK 1.4
(Java regular expressions are based on Perl) - see the Package summary for

As Mike says, regular expressions are "greedy" - they will grab as many
characters as they can.

But you can tell them to be non-greedy by adding the qualifier ? - (question

The opinions expressed herein are my own, and are not necessarily endorsed
by my employer ...
-----Original Message-----
From: []
Sent: 08 July 2003 15:51
To: JMeter Users List
Subject: Re: Regular expressions again

Ending a regex with .* is guaranteed to match the rest of the page.  Try
something like:


And buy a book about regular expressions - it's money well spent as regexes
are very complex.


On 8 Jul 2003 at 16:29, Bachor¡k Jaroslav wrote:

> Hi,
> I need to use the Regular Expression Extractor to get some data out from
the server response. However, I still have troubles with getting it working
properly. The first problem is connected with the "Match No." parameter of
RegExtractor - when I set it to 0 or 1 it works just nice. But when I use
other number I get "no match". I'm sure there's more than one occurence of
a string I search for but I can't get to it.
> And here goes the second problem - I want to extract all image sources on
web page. I use the following pattern to match the "img" tag ->
> What I get is either "no match" or a random piece of HTML source code
starting on the first image source and continuig randomly ...
> Any help would be appreciated
> Regards
> JBachorik
> ---
> Odchoz¡ zpr va neobsahuje viry.
> Zkontrolov no antivirov m syst'mem AVG (
> Verze: 6.0.497 / Virov  b ze: 296 - datum vyd n¡: 04.07.2003
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Michael Stover
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message