tags:

views:

31

answers:

2

Here is what my text file looks like:

    [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]

And the RegEx that I tried using that does not work:

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

What I want to do is strip out the [color=#000000] and [/color] from each line and leave the text and [img][/img] intact.

A: 

Umm ... how about replacing all [color=#000000] and [/color] with nothing using 'Find & Replace All' (once for each keyword)? No need to mess with regex that way ;)

Lukman
Because there are other [/color] blocks that I want to keep like [color=green] and [color=red]. So if I strip out all of the [/color] blocks, I have to go back and find those lines.
NeoFax
A: 

If you literally only want to remove the #000000 colors, then I agree with Lukman: use two instances of Find & Replace All.

I saw instances of other colors in that block, so I assume that you want to replace all colors, not just #000000. If so, then use a regex Find & Replace All with the pattern of \[color=#\d*] instead of the [color=#000000] string.

JGB146
Note that technically this would replace other blocks that have different numbers of digits inside the color block. The proper way is to specify the number of digits via `\d{6}`, however this is not supported in Notepad++. If you want to match exactly six digits only, you can use `\[color=#\d\d\d\d\d\d]` instead.
JGB146
Thanks for the \d info. That helps for the people that use a non-standard black text in chat. I found my problem as I didn't escape the [] and - in my RegEx. It now works how I want it to. Thanks again for all the help!
NeoFax