Regex for LIS-1234

would any be able to help me with generating a regular expression to detect LIS-1234 (the 1234 can be interchangable but for 4 numbers but the LIS- must always remain

@aquinn you can use regex like this

Can this also detect if it contains LIS- ?

And specifically 4 numbers

hey

you can just get the numbers from the string and just add the list at the start
image

System.Text.RegularExpressions.Regex.Replace(str_Input,"\D","")

regards

Thank you, but what would the regex expression be for this? that is needed for the workflow

System.Text.RegularExpressions.Regex.Replace(str_Input,“\D”,“”)

regards

Thank you but I think im not explaining well, I need he regular expression to get “LIS-1234” from an input, with the 4 numbers changing, I cannot manipulate the string as there are multiple in it.


or

LIS-(\d{4})

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