February 12th, 2012, 07:50 AM
Remove number out of a paragraph
I am struggling to find a expression which basically removes number/decimals from a paragraph.
Eg: jack and1 jill 233 up 3.4 hill. dsf234 sfd 4345 dsf67sdf.
output: jack and1 jill up hill. dsf234 sfd dsf67sdf.
Bold letters gone.
Experts.. Please help.
February 12th, 2012, 01:59 PM
Replace: a single space
This will work on your string, where numbers are surrounded by spaces. This will also work when numbers fall at the beginning and end of the string.
If you find a case where this does not work for you, post it and we'll tweak the regex. (It's impossible to know all the twists and turns of your input without seeing it.)
Wishing you a fun day
February 12th, 2012, 10:30 PM
Thanks for the reply bro.
The out of the RegEx is
"jack and1 jill up hill. dsf234 sfd dsf67sdf"
If you notice, decimal (.) remained. Need to remove that aswell.
February 12th, 2012, 10:54 PM
I don't think I understand, can you please explain?
The dot (.) that remains is not a decimal point: it's the period in "hill."
Are you saying that you also want to remove all periods? That's a different task. Let me know.
February 13th, 2012, 12:06 AM
Thanks a lot for all the help. Will keep updated if needed.
February 13th, 2012, 01:53 AM
Yes, please don't hesitate to ask if you'd like more help.
February 13th, 2012, 02:25 AM
Data can have numbers e.g. " 2 3 ewr4 3we er3er 4.5 5 sdf"
In such case it is not working.
e.g. and output below:
" 6 7 jack 6 and1 6 8 jill 7 233 up 3.4 7.8 9.00 7.89 sfd 4345 dsf67sdf 6.7 8.7 "
" 6 7 jack 6 and1 6 8 jill 7 up 7.8 7.89 sfd dsf67sdf 8.7 "
February 13th, 2012, 02:39 AM
Hi, just had a quick look: try this, it works for me.
Replace with a single space.