I am getting compiler error in the rgex expression. Can someone help?
Attached is the picture of the expression
in your expression you did not escape the doubel quotes
any double quotes in your regex expression which are enclosed inside double quotes should use double double quotes
examples are here
"(?<=.......................href=""mailto:.....""<)"
cheers
Hi @Krithi1
Your expression has misplaced quotes, can you pls try this
System.Text.RegularExpressions.Regex.Match(userAccessDataOutput.ToString, "(?<=<b>IO Approver: </b><br><a href=""mailto:)[a-zA-Z0-9 \-(@.)]*(?="">)").Value.Trim
Regards,
Its not working
Not sure what you need to extract ..try to give the text actually instead of photo and output for use to give any regex
But as said regex how you wrote in expression did not escape special characters…so escaping it shpuld do the job
Cheers
Attached is the screenhot with highlited data elements taht 8 need to extract.
Christopher.taller.1.ctr@IA.aa.com
Christopher taller
15678742897
@Anil_G i need to extract the above three
IO Approver:
christopher.taller.1.ctr@IS.aa.com
Christopher taller
15678742897
SAMEA HR User Access Data:
SAMEA HR User First Name: CHYENDNE
SAMEA HR User Middle Initial: L
SAMEA HR User Last Name: MORDA
SAMEA HR User Bank ;
Its almost impossible to see or understand from screenshot..please send a text file or paste the text here
Cheers
for email
(?<=href=""mailto:).*(?="">)
for next part
(?<=/a> *<br>).*
now split the extracted string with
and you would get the array of strings of which first is name second is id
cheers