質問編集履歴

5

2019/06/23 12:57

投稿

ono80
ono80

スコア11

test CHANGED
File without changes
test CHANGED
@@ -1,10 +1,10 @@
1
1
  ```php
2
2
 
3
- $a = /abcde/201605504930/
3
+ $a = /abcde/201605504930/“;
4
4
 
5
- $regex=[0-9]{12}
5
+ $regex=[0-9]{12}”;
6
6
 
7
- preg_match_all($regex,$a)
7
+ preg_match_all($regex,$a);
8
8
 
9
9
  ```preg_match_allを使おうとしているのですが、どうも上手くいきません。
10
10
 

4

2019/06/23 12:57

投稿

ono80
ono80

スコア11

test CHANGED
File without changes
test CHANGED
File without changes

3

2019/06/23 12:54

投稿

ono80
ono80

スコア11

test CHANGED
File without changes
test CHANGED
File without changes

2

2019/06/23 12:54

投稿

ono80
ono80

スコア11

test CHANGED
File without changes
test CHANGED
@@ -2,12 +2,18 @@
2
2
 
3
3
  $a = /abcde/201605504930/
4
4
 
5
+ $regex=‘[0-9]{12}’
6
+
7
+ preg_match_all($regex,$a)
8
+
5
9
  ```preg_match_allを使おうとしているのですが、どうも上手くいきません。
6
10
 
11
+ 上記のようにしたのですが、
7
12
 
13
+ ```php
8
14
 
15
+ Unknown modifier’{‘
9
16
 
17
+ ```
10
18
 
11
-
12
-
13
- 数字の部分を取り出したいのですが、どなたかよろしくお願いします
19
+ 数字の部分を取り出したいのですが、上のような結果になってしまい、うまくいきません。サイトは読み漁ったのですが、やはり、わからずじまいになっているので、どなたか分かる方、解決方法をお願いします

1

2019/06/23 12:51

投稿

ono80
ono80

スコア11

test CHANGED
File without changes
test CHANGED
@@ -1,8 +1,12 @@
1
+ ```php
2
+
3
+ $a = /abcde/201605504930/
4
+
1
- preg_match_allを使おうとしているのですが、どうも上手くいきません。
5
+ ```preg_match_allを使おうとしているのですが、どうも上手くいきません。
2
6
 
3
7
 
4
8
 
5
- $a = /abcde/201604043020/
9
+
6
10
 
7
11
 
8
12