Romanian Phone Number validator

Recently i had to implement a Romanian Phone Number validator… and i have managed to implement it as a method of the jQuery Validation Plugin. here is the whole method $.validator.addMethod(“phoneRO”, function(phone_number, element) { phone_number = phone_number.replace(/\(|\)|\s+|-/g, “”); return this.optional(element) || phone_number.length > 9 && phone_number.match(/^(?:(?:(?:00\s?|\+)40\s?|0)(?:7\d{2}\s?\d{3}\s?\d{3}|(21|31)\d{1}\s?\d{3}\s?\d{3}|((2|3)[3-7]\d{1})\s?\d{3}\s?\d{3}|(8|9)0\d{1}\s?\d{3}\s?\d{3}))$/); }, “Please specify a valid romanian phone number”); The