Regex for Japanese Phone Number
Regex Pattern
^(?:\+81|0)\d{1,4}[- ]?\d{1,4}[- ]?\d{4}$Japanese phone number with optional +81 country code
Quick Answer
The regex pattern for japanese phone number is `^(?:\+81|0)\d{1,4}[- ]?\d{1,4}[- ]?\d{4}$`. Japanese phone number with optional +81 country code. This works in JavaScript, Python, Ruby, PHP, Java, and most regex engines that support PCRE syntax.
Test Examples
| Input | Result |
|---|---|
| +81312345678 | ✓ Matches |
| 09012345678 | ✓ Matches |
| +81-3-1234-5678 | ✓ Matches |
| +81 | ✗ No match |
| 12345 | ✗ No match |
| +1312345678 | ✗ No match |
Code Examples
javascript
const regex = /^(?:\+81|0)\d{1,4}[- ]?\d{1,4}[- ]?\d{4}$/;
const isValid = regex.test(value);python
import re
pattern = r'^(?:\+81|0)\d{1,4}[- ]?\d{1,4}[- ]?\d{4}$'
if re.match(pattern, value):
print("valid")ruby
pattern = /^(?:\+81|0)\d{1,4}[- ]?\d{1,4}[- ]?\d{4}$/
if value =~ pattern
puts "valid"
endphp
if (preg_match('/^(?:\+81|0)\d{1,4}[- ]?\d{1,4}[- ]?\d{4}$/', $value)) {
echo "valid";
}java
String pattern = "^(?:\\+81|0)\\d{1,4}[- ]?\\d{1,4}[- ]?\\d{4}$";
boolean isValid = value.matches(pattern);Frequently Asked Questions
Related Regex Patterns
US Phone Number
US phone number in common formats
International Phone (E.164)
Validates E.164 international format — + followed by 2-15 digits
Indian Phone Number
Indian mobile number with optional +91 country code
UK Phone Number
UK mobile number with optional +44 country code
French Phone Number
French phone number with optional +33 country code
German Phone Number
German phone number with optional +49 country code