SublimeText2 Remove Duplicate
This is a cross post! - Not sure if it belongs in the GAD section...
Just wondering if any other SublimeText 2 users know how to resolve this issue without having to manually delete the repeated/duplicate value: I have an ungodly amount of lines that need one of the duplicate (1025 and 1151 in this example) values removed. Code:
s(-1025,1025,{32047, 32048, 32049, 32050, 32051, 32807, 32795},128) Cheers! |
Hmm, in a regular expression, it would probably be something along the lines of:
Code:
/(\d+),\1/ Code:
\1 EDIT: or even: http://regex101.com/r/vB1lW4 |
Quote:
You is my hero! THANKS! :D |
I don't know if this is even possible with regex/apend without having to do it manually:
Code:
s(895,"Stormshroud Armor",{15058,21278,23073,30362,12966},1544) --Leather Code:
s(895,"Stormshroud Armor",{15058,21278,23073,30362,12966},1544) --Leather; 895 |
Not sure if there's a pure regex solution (at least one you can drop into a search/replace dialog) but based on your example it looks like all the "base" sets have positive IDs and the "lookalike" sets have negative ones, so you could reduce the amount of copy/pasting you have to do by regex-ing the positive ID to the end, then just copying it to the ID-less lines below it.
|
Quote:
Quote:
Using the select line feature would eliminate 708 lines to comment and leave 89 lines to comment! :p |
I'm not a programmer, so I'm not 100% sure if this will help. But when I'm modifying lua I use Notepad++ it has a find and a find/replace function that make changing every instance of "MOM" to "DAD" simple as clicking the "find next" button then click the "replace" button.
Hope this helps. Coke |
Quote:
http://regex101.com/r/mR2fG3 |
Quote:
Still trying to figure out how to copy all the different line values, i.e. "s(1759", "s(892" etc. etc. throughout the entire ST2 document and then paste them at the end of their respective line. Any suggestion as to the proper method? EDIT: Code:
local comment, group |
You might try http://regex101.com/r/bC3wS3 with Phanx suggestion above
|
I am posting this to share with others for reference and so others could critique the regex I used to accomplish everything. Maybe someone will find this helpful.
Here is the example code: Code:
s(544,"Ahn'Kahar Blood Hunter's Battlegear",{50118,50789,50762,50812},4)--544
This was done in Sublime Text 2. ------------------------------------------------------------------------------
|
All times are GMT -6. The time now is 03:06 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI