Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Agility
      • Kanban workshop
      • Agile Fundamentals
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • Support
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Regex match string

Solved773 views18th July 2024Regex Regexreplace
0
James Stokell [DevOps Advocate]493 18th April 2024 0 Comments

I’m iterating through a table with children items and want to take an excerpt of the string in that parameter’s value.

I’ve set the shape data “Parameter” to “5605|ALARM”, and put a * in the text to display the full value currently.

I played about with using RegexReplace but I’ve not gotten the result I’m looking for.

Example parameter value: TS-IP In 11 (My Favourite TS Stream)

Result I want to display to users: My Favourite TS Stream

Please note that it will always be in the above format; TS-IP In xx (Capture Text here), but the xx will either be one or two digits of numbers.  If I could just get the first match out of a regex looking inside the brackets that would be good enough, but something a bit more tolerant to account for brackets put in by users would be great.  I can do this regex part myself it’s just the workflow in Visio I need help with

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th July 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
João Severino [SLC] [DevOps Catalyst]13.23K Posted 18th April 2024 7 Comments

Hi James,

You should be able to add a shape to your Visio with an expression like this

.* \((.*)\)$

It should work correctly for your use case and discard anything even if () is present.

See:

The final expression would be:

[RegexReplace:[Sep:,#].* \((.*)\)$#TS-IP (In) 11 (My Favourite TS Stream)#$1]

And where I have TS-IP (In) 11 (My Favourite TS Stream) for the example you would place the original value in as a variable or another placeholder.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th July 2024
James Stokell [DevOps Advocate] commented 18th April 2024

Hello Joao, thanks for your help!

I put your example in a text box and it worked perfectly, however I then replaced your example input text with *, hoping that it being inside the # it would still be recognised as the special placeholder it is, but what happens is the full value is shown in the text box.

This is a child of a table, and the ‘parameter’ shape field is set to ‘5605|ALARM’ and I had * in the text box which was being filled by the full input text I showed earlier (TS-IP…). Do I need to handle this outside of the text box and instead in shape data? How do I do that please?

Thanks, James.

João Severino [SLC] [DevOps Catalyst] commented 18th April 2024

Hi James,
The wildcard * won’t work in this case.
Could you try something like the following? (without the parameter shape data configured)
[RegexReplace:[Sep:,#].* ((.*))$#[param:*,5605]#$1]

James Stokell [DevOps Advocate] commented 18th April 2024

Hi Joao, can you tell me why the * doesn’t work in that case? So I understand going forward.

Also I’ve done that, but it’s not linking to the correct table row of the 5605 parameter, I’ve tried the following too but it results in nothing being shown:
[RegexReplace:[Sep:,#].* ((.*))$#[param:*,5605:[ParentTableIndex]]#$1]

I’ve tried that with and without the parameter shape data field (which I need to set still so that the shape gets the parameter’s alarm colour) it was set to *|ALARM

James Stokell [DevOps Advocate] commented 18th April 2024

Correction, the parameter data was previously: 5605|ALARM

João Severino [SLC] [DevOps Catalyst] commented 19th April 2024

If I recall correctly when having the * in the shape to be used as a placeholder for the shape data resolution, the order in which the steps are executed does not allow for both actions to be performed.
The shape data expects anything else on the shape other than the * to be static text and the placeholders on the shape itself expect a static expression that can be processed or that is another placeholder to be processed.

Show 2 more comments
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs