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
    • 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
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Match with part of a string.

Solved1.10K views15th December 2023match Visio
1
Gerwin van der Kamp [DevOps Enabler]2.91K 14th December 2023 0 Comments

Hi,

I’ve got an driver that returns an config string from an device. These strings look like this:

00010203
01010203
0C0D0E0F

etc, basically it comes down to added HEX values:

so it is device config string parameter 1 2 3 4 -> 00,01,02,03

now i want to show or hide a few shapes based on an parameter. paramer 1 for instance can be between 00-0f so i need to match the first two digits. For the second paramter i need to match the second set of two digits. and for the third parameter i need to match the 3th set etc.

How can i do this within an visio?

Gerwin van der Kamp [DevOps Enabler] Selected answer as best 15th December 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
João Severino [SLC] [DevOps Catalyst]13.02K Posted 14th December 2023 7 Comments

Hi Gerwin,

An option could be to use regex to parse the HEX values into each pair of digits.

In Visio, you can achieve this by using the option [RegexReplace:x,y,z] | DataMiner Docs

And then for the regular expression you can use ([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})

And then depending on the parameter you want you can use for the string that will replace each of the matches either $1 or $2 or $3 or $4 depending on whether you want the 1st, 2nd, 3rd, or 4th respectively.

Gerwin van der Kamp [DevOps Enabler] Selected answer as best 15th December 2023
Gerwin van der Kamp [DevOps Enabler] commented 15th December 2023

Hi i tried that, but i’m still getting the whole string back. I’ve got an shape with * as text and a Parameter shape data with the following:

[RegexReplace:[Sep:,%]([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})07,[cardvar:acp_slot]/#Emb1_Ch01/04%$1]

i figured i needed to use the Sep cause of the variable has an pid/key combo. However i still get the whole string back.

João Severino [SLC] [DevOps Catalyst] commented 15th December 2023

Hi,
Could you confirm if there is a typo in your comment? As I see 07, after the regex expression and only 1 %.
Additionally, could you try on a separate shape to have just the original input without using any placeholders? This could be helpful to verify if any other [Sep] are needed.

João Severino [SLC] [DevOps Catalyst] commented 15th December 2023

Re-reading your original question a doubt came to my mind.
Is your input 00010203 or does it contain ,? Like 00,01,02,03?
If it is the first then the original expression should work (https://regex101.com/r/nQN09b/1) otherwise if it should contain the , then you should use ([0-9a-fA-F]{2}),([0-9a-fA-F]{2}),([0-9a-fA-F]{2}),([0-9a-fA-F]{2}) (https://regex101.com/r/nQN09b/2)

Gerwin van der Kamp [DevOps Enabler] commented 15th December 2023

There is a typo but i think it’s an html issue[RegexReplace:[Sep:,%]([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})07,[cardvar:acp_slot]/#Emb1_Ch01/04%$1]

so after the last ([0-9a-fA-F]{2}) there is an % 3007, (but without the space)

I try to access the paramter/displaykey: 3007,[cardvar:acp_slot]/#Emb1_Ch01/04 that’s why i did the Sep:,%

João Severino [SLC] [DevOps Catalyst] commented 15th December 2023

Could it be that you are missing a [param:] placeholder around the part where you try to access the parameter/displaykey?
Something like
[RegexReplace:[Sep:,%]([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})%[param:*,3007,[cardvar:acp_slot]/#Emb1_Ch01/04]%$1]

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