Hi Team,
Can anyone please help me with regex to replace every number in string having following with space.
Example
1. Test 2121k$ test data :--> Test test data
2. Test 2121k€ test data :--> Test test data
3. Test 1000k CHF test data set :--> Test test data set
4. Test 1000k EUR test data set :--> Test test data set
5. Test 1000k USD test data set :--> Test test data set
Thanks
Bihitak
Discussion posts and replies are publicly visible
There may be a more elegant way but it's easiest to understand and implement as two expressions:
The first rule looks something like this:
fn!reduce( rule!SJB_ER_replaceCurrencyValue, ri!data, { "\$", "€", "CHF", "EUR", "USD" } /* note that the dollar symbol in the list above includes the backslash escape character as */ /* the dollar symbol has a speical menaing in regex expressions */ )
and the second rule looks like this:
fn!regexreplaceall( concat("[0-9]*k", ri!currency), ri!data, " " )
If you need any further explanation as to what's happening here please ask.