BBedit - Replace from line 34 to 56

Hello,…

I want to replace in multiple html file some lines every time is the same line, I wat for example replace/delete the line 10 to 15.

and then replace some

but that I can make manually by find and replace

Thank you if you can help me with the replace/delete the line beetween 10 to 15

:wink:

Hello,

I don’t know if you want to delete or replace,. so uncomment the command you want.

tell application "BBEdit"
	activate
	tell window 1
		select (lines 10 thru 15)

		(* Replace...depending on what the line endings of the document are... use \\r or \\n *)
		--replace "^.*\\r" using "<p>\\r" searching in selection options {search mode:grep, extend selection:false}

		(* Delete *)
		--delete selection
	end tell
	save document 1
end tell

Wahou thank you very much, for your answer…

Sorry to answer only now.

this solution work great,…

I don’t know if it’s possible to do a variant, not with the lines but with certain

like that:
replace all the lines between, this one include, with
I don’t know if ypou need the exact expression

[b]

[/b]

and not only for one open window for all open document in bbedit

Thank you very much for your Help !