How to get specific price value

Hi I am using Regex and just trying to figure out how to get data from specific set

Ex

Product Price .…… $100
Product Price1… $200

I am using configure regular expression but, I am not sure what should be the pattern to extract only 100

The configuration I tried is

Regex ---- Value ---- Quantifier
Literal ---- Product Price ---- Exactly
Advance---- (.*) ----- Exactly

Output I am getting is Product Price .…… $100

But I need only $100

Can anyone help

@dipon1112000

(?<=Product Price\s*\..*)\$\d+

image

System.Text.RegularExpressions.Regex.Match(Input,"(?<=Product Price\s*\..*)\$\d+").Value

hey @dipon1112000
try this pattern:
Product Price\s*\.+\s*\$(\d+)

Hi @dipon1112000

Try this:

Assign-> Input = "Product Price $100
Product Price1 $200"

Assign-> Output = System.Text.RegularExpressions.Regex.Match(Input,"(?<=Product Price\s+)\$?\d+").Value.Trim()

Input and Output variable are of DataType System.String.

Let me know if it works.

Regards

Try this:-

System.Text.RegularExpressions.Regex.Match(yourStringVariable, “(?<=$)\d+”).Value

It will give output= 100

Sorry for my ignorance, what I have now in the script is

  1. Configure Regular Expression (output is price)

  2. For Each (item In price)

  3. Assign (ProductPrice = item.toString)

So how should I implement the assign activity you have shared.

Hi @dipon1112000

Do you extract multiple amounts from Matches.

Regards

No only 1 amount per match

Ex

Match 1 is for product price
Match 2 is for plan price

But the pattern is “product price … $100” as of now in my script

It worked thank you very much

@dipon1112000

Welcome, Could you mark my thread as solution

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