jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Javascript
Date Thu, 22 Jan 2009 22:04:00 GMT
On 22/01/2009, André Mud <andre.mud@testdynamics.nl> wrote:
>
>  In my script i use the regex function to extract a number. This number
>  however is a string "0000856756".
>  I need to remove the leading 4 zero's. I tried to use the __Javascript
>  function with the function parseInt and parseFloat, but I get a message
>  "NaN" which probably means that the string isn't a number.
>  How do I convert the string into a number, or is there another way to do
>  this?
>
>  I also tried to adjust the regex function to '0000(.+?)\"); but this didn't
>  work either.

Try

"0*(\d+)"

>  Help will be appriciated.
>
>  Andre Mud
>
> --
>  View this message in context: http://www.nabble.com/Javascript-tp21613736p21613736.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


Mime
View raw message