0

I have some html files which I want to re-structure, something like this :

convert this:

<code>echo "hello world";</code>

to this:

[php]echo "hello world";[/php]

I know I can find / replace with notepad, but I would like to use a tool (preferrably online) where I can convert x1-abc-y1 to x2-abc-y2 , by choosing the x1,x2,y1,y2 parameters.

Do you know anything with this functionality ?

Thanks for any help !

4

1 回答 1

0

sed is the tool for the job!

$ echo "<code>echo "hello world";</code>" | sed 's/<\(\/\?\)code>/[\1php]/g'
[php]echo hello world;[/php]
于 2013-10-03T08:57:43.053 回答