String manipulation using regex

Hi ,

I had the string value like “P12334545Something” in this value I need only Something from this string I don’t know first letter and numbers will be same how to get Something if anyone know let me give an idea.
Thank you.

Hey @Spark_robot

Will the number of characters before “Something” be the same everytime?
That is 9?

1 Like

Hi @Rishabh_Lakhera

Yes it will be 10 digit for all

Hi, I think the Regex activity ‘Matches’ with the following in the pattern criteria, “(?<=P12334545).*” would work. Do note that the result would be an IEnumerable.

1 Like

A more general alternative would look like that:
(?<=\w\d{8}).+
It will match anything after 1 letter and 8 digits

Another way:
(?<=.{9}).+
This will simply match anything after 9 characters

2 Likes

Then you could just write str.Substring(9) that will give you evrythng after 5, “Something” in this case!

2 Likes

Thank you, once got value I ll inform