cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

regex for cleaning a request attribute

pbrown
Guide

Hey there, 

I'm having trouble extracting a value from a java method for request attribute.

to put it simple:

 

the value extracted : 100.000

the value we need   : 100000  (without the '.')

 

I'm trying to use regex to clean this up, but with no success

For example ([^\.]*+) returns 100 instead of 100000

 

any suggestions?

thanks!

Patricio

1 REPLY 1

AntonioSousa
DynaMight Guru
DynaMight Guru

@pbrown,

In reality,  I believe your regex should return a list of two results, 100 and 000

The same will happen with similar regexs, eg.  (\d+)

While it seems pretty easy, I believe it is not, as I have not been able to come up with one that works for all applicable values...

 

Antonio Sousa