Validating a Postcode in Java
Max O'Didily
Hello guys and girls, today I am here with postcode validation to help you get that A in your practical exam. I will be honest, most tutorials out there for this are too long or are terrible so I hope I break the trend and provide a useful video. All you do is get the user input, make a pattern object, compare the user input to the patter. If it matches the rule of the pattern (aka regex) then print true, if not then print false.
Regex code: "^[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][ABD-HJLNP-UW-Z]{2}$"
Easter holidays are over but I will try to upload as often as possible. Why not subscribe to keep notified when I upload? https://tinyurl.com/SubMaxODidily
Social media: Instagram: https://www.instagram.com/mcod1999/ Twitter: https://twitter.com/mcod1999
Validating a Postcode in Java ... https://www.youtube.com/watch?v=TsiM3qmVCAA
21248695 Bytes