How to remove unwanted columns and fields in Notepad++

shaunybhoy picture shaunybhoy · Aug 19, 2014 · Viewed 7.5k times · Source

I have a feed with the following columns:

product_name,description,aw_product_id,store_price,merchant_image_url,merchant_deep_link,merchant_category,merchant_product_id

Each line afterwards has all the information in this order. I only require the product_name for each line, not everything that comes afterwards.

So my question is, how do I remove everything and only keep the product_name?

Answer

MRAB picture MRAB · Aug 19, 2014

You could use a regex to replace the comma and everything after it with nothing:

Search: ,.*

Replace: (nothing)