Right what I was trying to do is validate some input so that the input must start with 2 letters and followed by 3 digits, but I can’t find a way of testing a string for this
boolean test;
String str;
str.format ("%s%s%d%d%d") //used this to give what the format was and was going to use it with a boolean, tried it in an if statement such as
if str.format = ("%s%s%d%d%d") then
{
test = true
}
else
{
test = false
}
I’m wondering what I would have to do to achieve this?
Sounds like you want a regular expression…
See the
Patterndocumentation for more details (and alternatives to\p{Alpha}).