-1

I Have a text file in which roman numbers are some digits after that. i need to remove all the roman numbers using regex in a generic way as i have many text files

XXII 99-1
V-2
(i) 
(ix)
(vii)
regex for first and second ^[XIVC]\s[0-9]+\-\[0-9]+
regex for after 2nd line ^\([ixv]+\)

not able to match regex can any one help with this

S S
  • 205
  • 2
  • 12
  • 4
    Possible duplicate of [How do you match only valid roman numerals with a regular expression?](https://stackoverflow.com/questions/267399/how-do-you-match-only-valid-roman-numerals-with-a-regular-expression) – Chris May 08 '19 at 07:44

1 Answers1

0

Try this regex, by replace:

[\D]

this will find you all the non-digits. Good Luck!

  • when i try to use separately as mentioned code on online it worked. But, it is not working in my context – S S May 08 '19 at 09:22