-3

Is there any way by which we can search specific pattern from project(.html files) and paste it into new file.

Using sublime text.

And then from the list search and comment those keyword that are not present in one more file.

Example HTML files

<a href="javascript:void(0)" title="getAlt('imageAlt')">IMG</a>
<a href="javascript:void(0)" title="getAlt('imageAlt2')">IMG2</a>
<a href="javascript:void(0)" title="getAlt('imageAlt3')">IMG3</a>
<a href="javascript:void(0)" title="getAlt('imageAlt4')">IMG4</a>

Get the keyword'getAlt' key in new file

imageAlt
imageAlt2
imageAlt3
imageAlt4

Prop file

imageAlt ="www.abc.com"
imageAlt2 = "www.abc1.com"
imageAlt22 = "www.abc11.com"
imageAlt3 = "www.abc2.com"
imageAlt4 = "www.abc3.com"

Search in the prop file for same name and rest should be commented

result

imageAlt ="www.abc.com"
imageAlt2 = "www.abc1.com"
#imageAlt22 = "www.abc11.com"
imageAlt3 = "www.abc2.com"
imageAlt4 = "www.abc3.com"

Any way to do it in sublime or any other task editor.

4castle
  • 32,613
  • 11
  • 69
  • 106
Kunal Vashist
  • 2,380
  • 6
  • 30
  • 59

1 Answers1

0

Text editor CudaText has multi-carets. Use multi-carets to do selection. After word jump right. Then copy/paste block of text.

Help text.

Pp pp
  • 1