Quantcast
Channel: MSBuildExtensionPack Discussions Rss Feed
Viewing all articles
Browse latest Browse all 468

New Post: Regex to extract text?

$
0
0

I am just wondering if I'm missing something obvious or there's actually not currently a way to do this:

I have a file with contents such as:

{some text} goes {here}
{moretext}

and I want to extract everything based on the regex {[^}]+}, so that my result is a list of items:

some text
here
moretext

Detokenise looks like it would in theory work with the Report action, but it looks like it's hardcoded to use the TokenExtractPattern, but that can't be modified while using Report, so any attempts to customize the TokenPattern result in

	error : ArgumentOutOfRangeException: Specified argument was out of the range of valid values.\r
	error : Parameter name: i\r

Is there a regex task that can do matching based on a custom pattern, taking input from a list of files or from an itemgroup or property (eg, I don't mind doing ReadLinesFromFile first)?


Viewing all articles
Browse latest Browse all 468

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>