Mar-22-2017, 08:03 PM
(Mar-21-2017, 04:00 AM)desul Wrote: Hiii,
How can I remove "[inside some number], (Fig. 8))from the line?
I have tried by using below command but it is not working. please tell me another method for it ........
e.g. [18], (Fig. 8)
line= line.replace("[/0-9]", "")
Your code is removing the string "[/0-9]". Per your example, that should never be in the source string.
It looks like you're trying to write a regular expression, which is what zivoni demonstrated. For testing, I like regexpal (http://www.regexpal.com/), since regular expressions can quickly get complicated.