How to extract date and specific number from string using regular expression

Hi Guys,

Following is my string, wanted to separate vehicle no, doc no and date.
variables are not stable, how to use regular expression to extract details.

Vehicle / Trans Doc No & Date: PB10W9757 & 546323 & 26/05/2018

HI @smita.mobifly

In your example:
Vehicle / Trans Doc No & Date: PB10W9757 & 546323 & 26/05/2018

Is the “&” (PB10W9757 & 546323 & 26/05/2018) available in all occurrences?
If that is available, they you can try to split your data based on that letter “&”

YourString.Split("&"c)

1 Like

this is not working, i want regular expression, in case & missing or any of the variable missing its throwing error.

Check this out… Might help you to build up a regex