1

I have a text file which contains some lines this

something1 1.2 MB
something2 5.3 MB

I want to remove (X.X MB), so I did this in notepad++

find what : *.*[ MB]

replace with:

Regular expression

But it says invalid regular expression. How can I fix that?

1 Answer 1

2

You might try:

Find:

 \d*\.\d* MB

(yes, there's a space before the first \d).

Replace with nothing.

\d stands for a digit in regex, and you need to escape the dot since the dot is a wildcard in regex. * is an operator and means 0 or more times. The square brackets is a character class and would otherwise match any one of space, M or B. Just remove them here.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.