We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36ac6f5 commit 4388c88Copy full SHA for 4388c88
regex/README.md
@@ -0,0 +1,27 @@
1
+#Question: Basic Regex Matcher
2
+
3
+Create a basic regex function that returns true if a `string` matches a `pattern`. This particular
4
+regex language only has 2 special characters, `.` and `*`.
5
6
+* `.` Matches any individual character, one time. The empty string *does not* match `.`
7
+* `*` Matches any number of characters, *including* the empty string.
8
9
+Examples:
10
11
+```
12
+string: 'foobar'
13
+pattern: '*'
14
+output: True, since * matches everything
15
16
17
18
19
+pattern: 'fo.bar'
20
+output: True, since . matches the second o and everything else matches.
21
22
23
24
25
+pattern: '*ob.z'
26
+output: False
27
0 commit comments