Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Can Source Links handle a regex?

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
jschroedl Posted - Jun 26 2017 : 09:36:29 AM
First, I'm very happy to see Source Links coming to VA!

Our bug system uses an ID field of 'S' followed by a 7-digit number.

Example: // For details of this bug, see S0650240.

I tried to create a source link with Keyword of S and Value of number but it doesn't identify these bug numbers.

It seems like I'd need a regex to pick them out. Should this be possible? If not, could we enter an enhancement request?

The URL I'd need to form would be formed using the whole ID.

Example: http://bugs.example.com/case/S0650240

John
6   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Jun 20 2018 : 10:20:36 AM
Happy to help.
StefanEgo Posted - Jun 19 2018 : 12:08:39 PM
Thanks sean, that did the trick for me/us.
sean Posted - Jun 19 2018 : 12:00:43 PM
Use \b instead of \s.
StefanEgo Posted - Jun 19 2018 : 11:44:40 AM
Running into a comparable situation myself. The disadvantages with the suggested regexps is that they also match inside words (f.e. AndroidS3 would be identified as a match with the regexp above). If I adjust the regexp to: re=(?<Keyword>\sS)(?<Value>\d+) (or alternatively simply: re=\sS(?<Value>\d+)) the above case would be handled correctly and S3 in AndroidS3 would not be marked. However this expression results in a different issue in that the leading space would then also be enclosed in the bracket for the source link which looks a bit ugly.

Is there any other suggestion to handle cases like these?
jschroedl Posted - Jun 26 2017 : 3:44:47 PM
Yes, indeed. That's perfect and is working!! That's awesome, I love it.

Thanks,
John
sean Posted - Jun 26 2017 : 3:29:59 PM
Under the covers, we do support regex expressions. It is not officially exposed in the UI at this time.

The following is subject to change but is applicable to builds 2219-2223.

You can use regex expressions if you start the keyword text with re=

For your use, the following are examples that will work:

keyword: re=(?<Keyword>S)(?<Value>\d+)
url: http://bugs.example.com/case/$(Keyword)$(Value)

keyword: re=(?<Value>S\d+)
url: http://bugs.example.com/case/$(Value)


Improved UI for regex support is case=109206.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000