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
rlgandu
(Rajyalakshmi Gandu)
2
@dipon1112000
(?<=Product Price\s*\..*)\$\d+

System.Text.RegularExpressions.Regex.Match(Input,"(?<=Product Price\s*\..*)\$\d+").Value
pikorpa
(Piotr Kołakowski)
3
hey @dipon1112000
try this pattern:
Product Price\s*\.+\s*\$(\d+)
Parvathy
(PS Parvathy)
4
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
-
Configure Regular Expression (output is price)
-
For Each (item In price)
-
Assign (ProductPrice = item.toString)
So how should I implement the assign activity you have shared.
Parvathy
(PS Parvathy)
7
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
rlgandu
(Rajyalakshmi Gandu)
10
@dipon1112000
Welcome, Could you mark my thread as solution
system
(system)
Closed
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.