Thanks to the help provided by people from this forum, i’ve been able to extract, and split a string according to certain parameters. However, I now need to validate this string that i’ve extracted in a custom format.
The custom format can be either:
10Chars-PTE-01 (can range from 01-09) e.g. 1234567890-PTE-01; or
9Chars-PTE-01 (can range from 01-09) e.g. 123456789-PTE-03
Is there an activity or regex that can help me in validating this format? and subsequently returning a boolean value.
All advice and help will be greatly appreciated, thanks much in advance!
The code seems to work well to validate only alphanumeric characters. Though it validates well for anything below 9 characters, the result seems to return “True” even though if my string has more than 10 characters…