Hello Team,
How can we use Regex defined in config file as Variable in Code
Example
If Config Contains
Name_ExtractedRegex | System.Text.RegularExpressions.Regex.Match( filtereddata,@“(?<=Passport-Number\W)(\w.*)$”).Value
How can we use this variable
Name_ExtractedRegex in Code
Thanks in advance
rlgandu
(Rajyalakshmi Gandu)
2
@NISHITHA
config(“Name_ExtractedRegex”).ToString
vrdabberu
(Varunraj Dabberu)
3
Hi @NISHITHA
Use as below in assign activity
RegexVariavle = Config("Name_ExtractedRegex").ToString
Hope it helps!!
Regards.
@rlgandu and @vrdabberu thanks for the prompt Response
The Variable type would be String
For
RegexVariavle
vrdabberu
(Varunraj Dabberu)
5
Hi @NISHITHA
RegexVariavle = Config("Name_ExtractedRegex").ToString
The RegexVariable will be of DataType System.String only.
Regards
Hi @NISHITHA
Try this: Assign Acitivty
Str_YourVariable = Config(“Name_ExtractedRegex”).ToString
Happy Automation 
rlgandu
(Rajyalakshmi Gandu)
7
@NISHITHA
OutputRegex is a string Variable
OutputRegex=config(“Name_ExtractedRegex”).ToString
This will be stored as a string
Hope it helps
@Nawazish_Ahmad
filtereddata variable is the extracted Text
If Config Contains
Name_ExtractedRegex | System.Text.RegularExpressions.Regex.Match( filtereddata,@“(?<=Passport-Number\W)(\w.*)$”).Value
How do we incorporate that here in Code the filtereddata
RegexVariavle = Config(“Name_ExtractedRegex”).ToString
@NISHITHA
Use .Replace(“filtereddata”,YourVariable)
system
(system)
Closed
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.