Using TokenPattern with Detokenise

Jun 9, 2010 at 2:09 PM

I can't seem to get this to work. Instead of using $(token) I'd like use something like #(token). I tried the following, but tokens are not getting replaced:

    <Detokenise
      TaskAction="Detokenise"
      TargetFiles="@(FileCollection)"
      TokenPattern="#\([0-9a-zA-Z-._]+\)#"
      ReplacementValues="@(TokenValues)"
      DisplayFiles="true">
      <Output TaskParameter="FilesProcessed" ItemName="FilesProcessed" />
      <Output TaskParameter="FilesDetokenised" ItemName="FilesDetokenised" />
    </Detokenise>

What am I doing wrong? Thanks...

 

Jun 9, 2010 at 2:12 PM

Correction:

    <Detokenise
      TaskAction="Detokenise"
      TargetFiles="@(FileCollection)"
      TokenPattern="#\([0-9a-zA-Z-._]+\)"
      ReplacementValues="@(TokenValues)"
      DisplayFiles="true">
      <Output TaskParameter="FilesProcessed" ItemName="FilesProcessed" />
      <Output TaskParameter="FilesDetokenised" ItemName="FilesDetokenised" />
    </Detokenise>

Coordinator
Jun 9, 2010 at 9:15 PM
Sorry, this is a bug. Basically the task is using a predefined extraction pattern to look for the name in the token you are providing. this only works with $(xyzstyle). I need to expose the property so you can do this.... I'll update the 3.5.7.0 and 4.0.1.0 branches in a moment. If you compile the code you will then be able to use it like this <Detokenise TaskAction="Detokenise" TargetFiles="@(FileCollection)" TokenPattern="#\([0-9a-zA-Z-._]+\)" TokenExtractionPattern="(?<=\#\()[0-9a-zA-Z-._]+(?=\))" ReplacementValues="@(TokenValues)" DisplayFiles="true"> <Output TaskParameter="FilesProcessed" ItemName="FilesProcessed" /> <Output TaskParameter="FilesDetokenised" ItemName="FilesDetokenised" /> </Detokenise> Mike
Jun 11, 2010 at 1:28 PM

What's the timeframe for 3.5.7.0, as I'd prefer to simply get the binaries in the form of an installer? Thanks...

Coordinator
Jun 11, 2010 at 1:55 PM

August.

You should be able to easily download and compile the source. You will need to just add skip verification and all will work. (sn.exe -Vr *,10d297e8e737fe34)

Mike