I have a dataset that looks a bit like this:
S' 32,437.44
37,071.36
' 7,800.00
- 86.06
922.11 A[-A 40
*v S' 2,078.86
25,064.00
150,429.00
hdu/d 531,342.34 #$a8d
As you can see, there are random unwanted strings sometimes to the left, sometimes to the right, sometimes both, of the amount in the middle, which is also separated in thousands when applicable.
I tried (.+)?(\d{1,3},?(\d{3})?\.\d+)(.+)? but for some reason couldn't get the desired result. Any ideas?
Solved! Go to Solution.
try using
[^\d|\.]
Greg
Thanks Greg, it almost worked, but it has trouble in cases where there are digits in the unwanted left or right strings. Any modification that could deal with that too?
For example
" 1 1 i / 2,253.48 xz
Thanks a lot @Greg_Murray , worked like a charm