How do I remove everything that doesn't have a certain number in it?
Squirtleshell last edited by
I’m have a list of codes and discount percentage and I’m trying to only keep the 100’s and remove the 50’s.
OPBD6 | Discount = 50 WLQN6 | Discount = 100 AZOR5 | Discount = 50 KQOY9 | Discount = 50 GVNE8 | Discount = 50
WLQN6 | Discount = 100
astrosofista last edited by
One way to get that is as follows:
Ctrl + H) and type in:
^.+Discount = (?!100).+\R
Regular expressionsearch mode
Click on the
AdrianTweeter last edited by
Another approach uses the Mark lines facility. Use Menu => Search => Mark. Enter
=, space, and
100) into ‘Find what’. Ensure that ‘Bookmark line’ and ‘Wrap around’ are selected. Then click on ‘Mark all’. Expect to see blue circles on the found lines. Next use Menu => Search => Bookmark => Remove unmarked lines. That should leave only the wanted lines.
If all the unwanted lines have
= 50then you could enter that into the ‘Find what’ and then use menu => Search => Bookmark => Remove bookmarked lines.
For either you could use more complex ‘Find what’ strings with regular expressions.