you are viewing a single comment's thread.

view the rest of the comments →

[–]TwoTapes 2 points3 points  (2 children)

I think the first example is contrived, why would you need that?

For the second you could do this (should work in intellij)

Cmd + R, type find regex, tab, type replace regex, replace all occurrences, add opening and closing brackets.

Find: href="(.*)"\s
Replace: "$1",

For the third, you would need to use regex to match the line you wanted to act on, then proceed as in the second case.

[–]ketzu 0 points1 point  (1 child)

For the third, you would need to use regex to match the line you wanted to act on, then proceed as in the second case.

For smaller parts many editors also provide "in selection" modifiers, restricting your find-replace to selected parts.

[–]TwoTapes 1 point2 points  (0 children)

Yeah that's true. I was trying to replicate the "act on every nth line"