I have a database table that I exported. I need to replace the image file name with a space and use notepad ++ and regex for this. I have:
'data/green tea powder.jpg'
'data/prod_img/lumina herbal shampoo.JPG'
'data/ALL GREEN HERBS.jpeg'
'data/prod_img/PSORIASIS KIT (640x530) (2).jpg'
and you need to make them like this:
'data/green_tea_powder.jpg'
'data/prod_img/lumina_herbal_shampoo.JPG'
'data/ALL_GREEN_HERBS.jpeg'
'data/prod_img/PSORIASIS_KIT_(640x530)_(2).jpg'
I just want to change the spaces between quotes (I don't want to change capitalization). To be more specific, I would like to replace any and all spaces between "data / and", because there are other spaces between quotes in the database, for example:
'data/ REPLACE ANY SPACE HERE '
I found this:
\s(?!(?:[^']*'[^']*')*[^']*$)
, , data/
, , , . \s(?!(?:[^'data\/]*'[^']*')*[^']*$)
, , , .
:
(712, 'GRTE-P', '', 'data/green tea powder.jpg', '2014-03-12 22:52:03'),
, .
!