回答編集履歴

1

chousei

2021/04/20 04:43

投稿

yambejp
yambejp

スコア116443

test CHANGED
@@ -6,7 +6,23 @@
6
6
 
7
7
  $pattern="/\W/";
8
8
 
9
- if(!preg_match($pattern,$str,$m)){
9
+ if(!preg_match($pattern,$str)){
10
+
11
+ print "OK";
12
+
13
+ }
14
+
15
+
16
+
17
+ ```
18
+
19
+ もしくは
20
+
21
+ ```
22
+
23
+ $pattern="/\A\w+\z/";
24
+
25
+ if(preg_match($pattern,$str)){
10
26
 
11
27
  print "OK";
12
28