回答編集履歴
1
メールアドレスの例を増やす
test
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
|
5
5
|
```ruby
|
6
6
|
|
7
|
+
a = "abcd@yahoo.co.jp"
|
8
|
+
|
7
|
-
|
9
|
+
b = "abcdefg@yahoo.co.jp"
|
8
10
|
|
9
11
|
|
10
12
|
|
@@ -12,4 +14,20 @@
|
|
12
14
|
|
13
15
|
puts m[1] + "*" * m[2].length + m[3] if m
|
14
16
|
|
17
|
+
|
18
|
+
|
19
|
+
m = /^(..)(.*?)(@.*)$/.match(b)
|
20
|
+
|
21
|
+
puts m[1] + "*" * m[2].length + m[3] if m
|
22
|
+
|
15
23
|
```
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
```results
|
28
|
+
|
29
|
+
ab**@yahoo.co.jp
|
30
|
+
|
31
|
+
ab*****@yahoo.co.jp
|
32
|
+
|
33
|
+
```
|