jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: regular expression extractor
Date Mon, 22 Dec 2008 16:07:05 GMT
On 22/12/2008, PAULO LOURENCO (RE-ESI-Workflow) <paulo.lourenco@esi.pt> wrote:
> Greetings!
>
>  Let me just say that I added the \s to the end of your proposed solution:
>
> [a-zA-Z]{min,max}(\d+)
>
> To look lik:
>  [a-zA-Z]{min,max}(\d+)\s
>
>  To ensure the number is followed by a white space and everything is looking good!!!

If you refer back to my posting, you'll see that:

'[a-zA-Z]{min,max}(\d+) '

already has a space after the number...

Your original posting said the word was followed by a space, rather
than white space (which includes tab etc), otherwise I would have used
\s.

>  Thanks!
>
>
>  -----Original Message-----
>  From: sebb [mailto:sebbaz@gmail.com]
>  Sent: sábado, 20 de Dezembro de 2008 1:47
>  To: JMeter Users List
>  Subject: Re: regular expression extractor
>
>  On 19/12/2008, Serpent_Guard <bluegate010@gmail.com> wrote:
>  >
>  >  Whoops, that's '[\w^\d]+'.
>
>  [^\d] means all but 0-9 but [\w^\d] means \w, ^, or \d so it will
>  match more than is required.
>  The ^ only negates a class if present at the start.
>
>  This can be seen by using the demo at:
>
>  http://jakarta.apache.org/oro/demo.html
>
>  For example, try the input 'abcd12^3xyz' - '[\w^\d]+' matches in its entirety.
>
>  The original poster wrote:
>
>  > Basically I want to extract a number that comes after a word and that is
>  > followed by a space and something else. Ex:
>  >
>  > Word 123 - more stuff
>
>  If by a word you mean only alphabetic characters, then
>
>  '[a-zA-Z](\d+) '
>
>  (without the ')
>
>  should extract the digits following the last letter of a "word".
>
>  Or, if you know the min and max lengths of a word, you could use:
>
>  '[a-zA-Z]{min,max}(\d+) '
>
>
>  >  --
>  >
>  > View this message in context: http://www.nabble.com/regular-expression-extractor-tp21074258p21086104.html
>  >
>  > Sent from the JMeter - User mailing list archive at Nabble.com.
>  >
>  >
>  >  ---------------------------------------------------------------------
>  >  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
>
>
>  ---------------------------------------------------------------------
>  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