Re:ASCII Art in .NET Code
by McGlockenshire on Tuesday July 09, 2019 @11:39PM
(#20398992)
All it's doing is sniffing segments that look like they might be comment blocks, sections in double quotes, and... I'm not actually sure what the last segment would be, it seems to capture @"whatever"? Regardless, this doesn't actually sniff for ASCII art as much as comments themselves.
[ Parent
| on HN ]
Re:ASCII Art in .NET Code
by matthewwarren on Wednesday July 10, 2019 @07:10AM
(#20400837)
> Regardless, this doesn't actually sniff for ASCII art as much as comments themselves.
Yeah you're right. The regex just finds comments. I then wrote some very simple code that analysed the text inside the comments to find potentially interesting ASCII Art. I then looked through these manually to get the ones for the post.
Re:ASCII Art in .NET Code
by bhrgunatha on Wednesday July 10, 2019 @12:38AM
(#20399184)
In C# @"..." are verbatim strings - useful for capturing characters without having to escape them.