Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
Order By
Most Recent
Most upvotes
Most downvotes
Highest Score
Lowest Score
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 15,000 community submitted regex patterns...
There does not seem to be anything here
Community Library Entry
0
Regular Expression
PCRE (PHP <7.3)
/
^\d
{6}
(
-
[
a
-
zA
-
Z0
-
9
]
|
[
a
-
zA
-
Z0
-
9
]
)+
$
/
Open regex in editor
Description
最多32個字元
可允許的字元為數字[0-9]、大小寫英文[a-z A-z]與 "-"
前六個字一定是數字, 例: YYYYMM
後面可直接是數字或英文字
可用一個 "-" 或 "
" 做分隔,不能連續。例:"---"、"
__
"、"-
"
尾端不留 "-" 例:201811example-
可允許的範例
2018113100001
201811thisIsExample
201811example-12345
20181109-example-123
不允許
201811
abc201811test-example
2018example-123
201811--example---456
201811中文 abc example! @xyz
201811-we-are-here-
Submitted by
anonymous
-
6 years ago