Блокнот ++ полосы bbcode цвет заявления - PullRequest
1 голос
/ 21 августа 2010

Вот как выглядит мой текстовый файл:

    [img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]done for the night then?[/color]
GM: [color=#000000]Yes[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]I would prolly plan on altruis notshowing up[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]i've known both of em for 10 or soyears[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]tycho is without power tonight[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]he lives in the middle of farm country[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]on a dirt road off a dirt road[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]I went through the massive ice stormback in the 90s that ruined New England's power system, I know allabout it[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]your at 424.42[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]I'll send you a statblock for Ciro myenchanter tomorrow[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]I struggled with Kazac[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]er not enchanter air wizard...[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]its fun[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]I actually been pretty excited forthis AP[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]I'll do a nice photoshop map of outkingdom when we get there[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]Im a decent cartographer[/color]
GM: [color=#000000]This AP is really kick ass when yousit down and read it. Although, if you have player's like my RotRLgames on Fridays, this game would suck.[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]I am the most generalist char statwise here[/color]
GM: [color=#000000]All of the different roles are on thewiki for you guys to decide what you think would best benefit youand the party.[/color]
Valens: [color=#000099]REally? 14, 14, 12, 12, 16, 12[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]12,16,14,12,14,12[/color]
Valens: [color=#000099]LOL[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]nope[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]i'll add it to my watch instantly[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]ps3[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]and wii[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]ps3 just got the search feature[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]if we have to find some people toreplace im fine with that[/color]
GM: [color=#000000]Plus, NetFlix just signed a deal withShowtime and Epix[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]yea[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]paramount and lion's gate moviesstarting sept 1st[/color]
Valens: [color=#000099]Goodnight. Having fun. TOo bad Jaycouldn't join us...[/color]
GM: [color=#000000]Yeah, I will post again on the TangledWeb site and RPTools[/color]
[i][color=#0000ff]mdh is disconnected.[/color][/i]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]might be worth asking jay again, mighthave cooled down for him its, been about 3-4 weeks[/color]
[img]asset:/052cf103006dc0a1aee06067b12b2153-40[/img] Adrik Thorgrim: [color=#000000]goodnight see you sat[/color]

И RegEx, который я пытался использовать, который не работает:

[color \ = # 000000] ([A-Za-z0-9,. <> ?: "; '{} [] -_ = +! @ # $% ^ & * ()] +) [ / цвет]

Что я хочу сделать, так это убрать [color = # 000000] и [/ color] из каждой строки и оставить текст и [img] [/ img] нетронутыми.

Ответы [ 2 ]

0 голосов
/ 21 августа 2010

Если вы буквально хотите удалить только цвета #000000, то я согласен с Лукманом: используйте два экземпляра Find & Replace All.

Я видел экземпляры других цветов в этом блоке, поэтому я предполагаю, что вы хотите заменить все цвета, а не только #000000. Если это так, используйте регулярное выражение Find & Replace All с шаблоном \[color=#\d*] вместо строки [color=#000000].

0 голосов
/ 21 августа 2010

Умм ... как насчет замены всех [color=#000000] и [/color] ничем, используя «Найти и заменить все» (один раз для каждого ключевого слова)?Не нужно так связываться с регулярным выражением;)

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...