Berto2002 Posted November 30, 2021 Share Posted November 30, 2021 I have the following naming convention for the Telephone Number Asset in the database: "Telephone DDI - 01702 215761 - Ext 5761" Sometimes, I just want to refer to the actual number only, "01702 215761" I just know there is a way to do this and it's likely to be something in Utils but I lack the experience/skill to work it out. Our consultant on implementation put this in one of our workflows to extract the UserID from the fully-resolved name with ID but I don't really know how it works: This Expression seems to strip-out everything that is not between the brackets in a string like this: "FirstName SecondName (FirstNameSecondName@org.gov.uk)" and gives the result, "FirstNameSecondName@org.gov.uk" Link to comment Share on other sites More sharing options...
Ricky Posted December 1, 2021 Share Posted December 1, 2021 Hi @Berto2002, Thank you for your post. You can modify the above regular expression to look for the first -{space} (?<=-\s) and strip out all characters (.*?) up to the next {space}- (?=\s-). The full expression would look like the following (?<=-\s)(.*?)(?=\s-). Regards, Ricky Fearon Product Specialist 1 Link to comment Share on other sites More sharing options...
James Ainsworth Posted December 1, 2021 Share Posted December 1, 2021 http://regex101.com can be a very useful tool for creating regex expressions. I've learned a lot using this site. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now