teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

2

リベンジ

2017/07/27 04:11

投稿

yumetodo
yumetodo

スコア5852

answer CHANGED
@@ -5,4 +5,14 @@
5
5
  でマッチするかと
6
6
 
7
7
  ref:
8
- - [python - Regex to match digits of specific length - Stack Overflow](https://stackoverflow.com/questions/4824942/regex-to-match-digits-of-specific-length)
8
+ - [python - Regex to match digits of specific length - Stack Overflow](https://stackoverflow.com/questions/4824942/regex-to-match-digits-of-specific-length)
9
+
10
+ 追記
11
+
12
+ コメントでダメ出しされたのでリベンジ。
13
+
14
+ ```
15
+ (^(\d{1,2})$|[^\d](\d{1,2}))
16
+ ```
17
+
18
+ これで`$1`/`$3`をみる・・・いやダサいな。

1

ref

2017/07/27 04:11

投稿

yumetodo
yumetodo

スコア5852

answer CHANGED
@@ -2,4 +2,7 @@
2
2
  ^\d{1,2}$
3
3
  ```
4
4
 
5
- でマッチするかと
5
+ でマッチするかと
6
+
7
+ ref:
8
+ - [python - Regex to match digits of specific length - Stack Overflow](https://stackoverflow.com/questions/4824942/regex-to-match-digits-of-specific-length)