質問編集履歴
1
追記しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,7 +12,41 @@
|
|
12
12
|
|
13
13
|
```ここに言語を入力
|
14
14
|
|
15
|
+
function doubleConsonant($str)
|
16
|
+
|
17
|
+
{
|
18
|
+
|
19
|
+
$c = $this->regex_consonant;
|
20
|
+
|
21
|
+
|
22
|
+
|
15
|
-
return preg_match("#$c{2}$#", $str, $matches) AND $matches[0]{0} == $matches[0]{1};
|
23
|
+
return preg_match("#$c{2}$#", $str, $matches) AND $matches[0]{0} == $matches[0]{1};
|
24
|
+
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
function cvc($str)
|
30
|
+
|
31
|
+
{
|
32
|
+
|
33
|
+
$c = $this->regex_consonant;
|
34
|
+
|
35
|
+
$v = $this->regex_vowel;
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
return preg_match("#($c$v$c)$#", $str, $matches)
|
40
|
+
|
41
|
+
AND strlen($matches[1]) == 3
|
42
|
+
|
43
|
+
AND $matches[1]{2} != 'w'
|
44
|
+
|
45
|
+
AND $matches[1]{2} != 'x'
|
46
|
+
|
47
|
+
AND $matches[1]{2} != 'y';
|
48
|
+
|
49
|
+
}
|
16
50
|
|
17
51
|
```
|
18
52
|
|