Hi team,
How to extract only number present in the text .
And the text may vary.
Regards,
Bhagyashree
Hi team,
How to extract only number present in the text .
And the text may vary.
Regards,
Bhagyashree
Please put the input and output samples
If the number does not have points or comma use \d+
If it has points \d+\.\d+
If it has comma also then [\d,]*\.\d+
Cheers
How to use regular expression…we need to pass it on assign activities right?
You can use matches activity or use assign as below
Requirenumberstring = System.Text.RegularExpressions.Regex.Match(InputStringVariable,"\d+").Value
Cheers
StrOutput=System.Text.RegularExpressions.Regex.Match(currentItem.ToString,"[\d\,]*\d+\.?\d*").Value
You can try the below syntax:
Output= System.Text.RegularExpressions.Regex.Match(Input,"\d+[.,]?\d*[.,]?\d*").Value
Hope it helps!!
Try to extract with the Regular expressions, Check the simple below expression,
[\d\,?\.?]+
You can check in the regexr.com
For Example -
- Assign -> Input = "For the Meeting 8,750 memebers attended"
- Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input.ToString,"[\d\,?\.?]+").Value
Check the below workflow for better understanding,
Hope it helps!!
Can you try the below
InputString="Hello world! 1234 How are you?"
Output=New String(InputString.Where(Function(c) Char.IsDigit(c)).ToArray())
Cheers!!
Thank you so much …it worked
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.