Hi All,
I wan to extract Amount when search word found.
Text Data: Company name currency JPY Gross Amount .1890 date 13/01/2022.
Output: .1890
How can I extract data after Gross Amount word found.
Thanks in advance
Niranjan
Hi All,
I wan to extract Amount when search word found.
Text Data: Company name currency JPY Gross Amount .1890 date 13/01/2022.
Output: .1890
How can I extract data after Gross Amount word found.
Thanks in advance
Niranjan
Using Regex could be an option:

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum
@ppr @mkankatala thanks a lot both are working fine
Check the below workflow for better understanding:
Input= "Company name currency JPY Gross Amount .1890 date 13/01/2022."
Output= System.Text.RegularExpressions.Regex.Match(Input,"(?<=Gross Amount\s*)(.?\d+)").Value
Happy Automation!!
@Niranjan_k
Perfect
when exploring Regex more e.g. for training purposes and the dot before the number is relevant have a look here

dot is included as we defined a character along with digits in the set of needed chars surrounded with
When using a pattern where the definitions are done within groups ( we do see the round brackets) the dot represents any character except \n


or we escape with \ and define the dot as char


So, as shown you will have control of the pattern.
When regex is new we can also recommend the explanations. Screenshot from above were done with Regex101.com and setting

Also have a look at this pattern, where group separators are optional and included

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