Hi All,
I want to extract only the 00676000009tTAyAAM from below url .How can I use regex for that
https://sandbox--uat2.sandbox.lightning.force.com/lightning/r/Opportunity/00676000009tTAyAAM/view
Hi All,
I want to extract only the 00676000009tTAyAAM from below url .How can I use regex for that
https://sandbox--uat2.sandbox.lightning.force.com/lightning/r/Opportunity/00676000009tTAyAAM/view
Check the below regular expression,
- Assign -> Input = "https://sandbox--uat2.sandbox.lightning.force.com/lightning/r/Opportunity/00676000009tTAyAAM/view"
- Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input.toString,"(?<=Opportunity/)[\d\w]+").Value
Check the below workflow for better understanding,
Hope it helps!!
Try the above
Usage Requiredval = system.Text.RegularExpressions.Regex.Match(str,"(?<=Opportunity/).*(?=/view)").Value
Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.