Selecting the part of XML

Hey all,
I’ve the
val1.Element(“somevalue”)
and got the below result.
image

Now I want the Output in the below format:
image

Is it possible?

Thanks in Advance

Hi @ray_sha

Is this the thing you want as output ??
image

So by using Regex you can get it by enabling below 2 Flags
image

Hope this may help you to solve your query
Mark as solution if this helps you and like it :innocent:

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Hey,

can I get some more information on Reg expressions?

Hi @ray_sha

A regular expression is an object that describes a pattern of characters.
Regular expressions are used to perform pattern-matching and “search-and-replace” functions on text.

Within UiPath you can implement Regex by using Matches Activity.

So it is used for Extracting any Data based on patterns

For using Regex you must have knowledge about

  1. Modifiers
  2. Brackets
  3. Metacharacters
  4. Quantifiers
  5. Der Properties, Methods & Flags

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Thanks so much

Hi @ray_sha

Cheers
You are Welcome

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

Hey
Can you tell me the package ?

I have this option.

Thanks

Hi @ray_sha

The Package name is “UiPath.Core.Activities.Matches”

You just need to edit within properties panel
image

Within that
Input = “The variable in which your input is stored that should be in String”
Pattern = “(?<=<posting.+>).+”
Result = “Create new variable” For Eg :- abc

RegexOption :- image

And to view the output within WriteLine or Messagebox just use
The variable that you have created newly to store result
For eg :-
abc(0).value

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

Hey,

I trying to read for a text file which uses the
var1.Element(“somevalue”) operation and than store the value in the variable.

I pass the variable as input string to the matches activity
I get this output.

image

Any idea?

Thanks in Advance.

Hi @ray_sha

Can you share the input File and the workflow on which you are working ??
So that i can go through it once as where it is going wrong

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.