Specific question about .*(Reg Ex) Match Type

andreborges

New Member
Hi all,

I have been facing some issues during last week and even having read all past posts in the forum, I still don't know how to deal with my problem.

So the point is:

I identify in Application Modeller some element and I put one attribute as Dynamic:

View attachment 1545577858487.png

Then, I inserted a "navigate" to my object paper:

View attachment 1545577719299.png

And inside "Params" I put:

View attachment 1545577952488.png

So, my problem is that when I click Run I get the error:

View attachment 1545578068313.png

Anyone knows how to deal with this?

Thank you in advance
 

Attachments

  • 1545577419547.png
    10.9 KB · Views: 85
  • 1545577552949.png
    6.5 KB · Views: 70

sivagelli

Well-Known Member
The problem could be due to unclosed ']' in your regex expression. You are asking BP to match a regex pattern and the regex expression you passed is having opening square bracket without closing bracket, so it is resulting in error as it is not a valid expression.

Quick questions:
- what text you are trying to match to?
- Have you tested your regex?
- Also, why using dynamic match type and regular expression? Have you tried Regex in the match type in the Modeller itself
- can wild card match type useful in your case?
 

andreborges

New Member
Hi sivagelli,

Thank you for your reply.

I am tryng to get the string that are between the brackets.
In fact, i want to pass through the process a variable. This var could be 1.0, 2.0, 3.0, 4.0, 5.0, or 6.0
And I know that if I put in params only “treeviewItem[3.0” I should get only one attribute in the application page.
So, the regex should recognize the entire parameter right?
How can I avoid the use of [ ] in this particularly case? Or in other way, we have a way to get the string between brackets?

Thank you,
Merry Christmas,
Andre
 

sivagelli

Well-Known Member
In fact, i want to pass through the process a variable. This var could be 1.0, 2.0, 3.0, 4.0, 5.0, or 6.0
If you know that the acceptable value is from 1.0 to 6.0, the best way and less complicated way is to pass the value as a variable as you already thought of.

A simple regex that can help you to match treeviewItem[1.0] or treeviewItem[2.0] ... treeviewItem[6.0], could be

treeviewItem(\[[0-9.]+\])

I am no expert in regex, use the above with due diligence ;)

Merry Christmas!
 
Top