How to extract digit from the string using regex?
Posted
by Harikrishna
on Stack Overflow
See other posts from Stack Overflow
or by Harikrishna
Published on 2010-05-11T06:55:22Z
Indexed on
2010/05/11
7:04 UTC
Read the original article
Hit count: 496
I will have a different type of string(string will not have fixed format,they will be different every time) from them I want to remove some specific substring.Like the string can be
OPTIDX 26FEB2009 NIFTY CE 2500
OPTIDX NIFTY 30 Jul 2009 4600.00 PE
OPTSTK ICICIBANK 30 Jul 2009 700.00 PA
I want to extract Rs.(digit) from those string and store it into one variable and then in those string there should not be Rs.(digit).
What should be the regex for that to match Rupees ?
© Stack Overflow or respective owner