colindembovsky / cols-agent-tasks

Colin's ALM Corner Custom Build Tasks
MIT License
83 stars 67 forks source link

Replace Tokens Default Token Regex for Arrays #122

Closed PB-BThornton closed 5 years ago

PB-BThornton commented 5 years ago

Hello,

Thanks for adding support for json string arrays in the Replace Tokens task. One piece of feedback, in order to identify my token as an array I had to add [] to the end of the token name but this means the Token Regex in the task __(\w+)__ no longer matched my token. I am currently working around this by updating the Token Regex on each task to __(\w+[\.\w+]*\[?\]?)__ as suggested in this comment https://github.com/colindembovsky/cols-agent-tasks/pull/112#pullrequestreview-195770530

Is this expected behavior or should the default Token Regex in the Replace Tokens task be updated to account for array variables now?

Thanks

colindembovsky commented 5 years ago

Hi @PB-BThornton yes, the default expression is not for arrays - but I've made the expression configurable for cases where you need to deviate from the default, such as this case. Taking no action here.