Java Postal Code Check checkPostalcode(String postalCode)

Here you can find the source of checkPostalcode(String postalCode)

Description

check Postalcode

License

Open Source License

Declaration

public static boolean checkPostalcode(String postalCode) 

Method Source Code


//package com.java2s;

import java.util.regex.Pattern;

public class Main {

    public static boolean checkPostalcode(String postalCode) {
        return Pattern.matches("[0-9]\\d{5}", postalCode);
    }/*from   ww w. j  a v  a 2s  .  c o m*/
}

Related

  1. IsPostalcode(String str)