Ahmed Omara
Ahmed Omara

Reputation: 1

How Can I Replace Text Between Slashes On Notepad?

Can I Reploace Text Between Slashes On Notepad Like : files/ballistic-biscuit/ballistic-biscuit.jpg Replace It With files/ballistic-biscuit.jpg But It is not the same line Form It like files/bomb_darts/bomb_darts.jpg And files/cootie/cootie.swf

Plz Help Me

Upvotes: 0

Views: 7861

Answers (1)

sogosu
sogosu

Reputation: 110

You have a file that contains path information text in the following format:

files/ballistic-biscuit/ballistic-biscuit.jpg
files/bomb_darts/bomb_darts.jpg
files/cootie/cootie.swf

You want to remove the intermediate directory from file path. The filename minus the extension is the same as the intermediate directory that you want to remove.

files/ballistic-biscuit/ballistic-biscuit.jpg

becomes

files/ballistic-biscuit.jpg

In other words, the intermediate directory name is the same as the filename without the extension.

Use the regex find/replace mode to find and select everything between the slashes including the slashes. Then replace with one slash.

http://sourceforge.net/projects/notepad-plus/forums/forum/331754/topic/4686065

Use this: Notepad++ regex

Upvotes: 3

Related Questions