mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-24 14:28:56 +08:00
移除零宽空格
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"boundTopicId": null,
|
||||
"title": "Regular Expression Matching",
|
||||
"titleSlug": "regular-expression-matching",
|
||||
"content": "<p>Given an input string <code>s</code> and a pattern <code>p</code>, implement regular expression matching with support for <code>'.'</code> and <code>'*'</code> where:</p>\n\n<ul>\n\t<li><code>'.'</code> Matches any single character.</li>\n\t<li><code>'*'</code> Matches zero or more of the preceding element.</li>\n</ul>\n\n<p>The matching should cover the <strong>entire</strong> input string (not partial).</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "aa", p = "a"\n<strong>Output:</strong> false\n<strong>Explanation:</strong> "a" does not match the entire string "aa".\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "aa", p = "a*"\n<strong>Output:</strong> true\n<strong>Explanation:</strong> '*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes "aa".\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "ab", p = ".*"\n<strong>Output:</strong> true\n<strong>Explanation:</strong> ".*" means "zero or more (*) of any character (.)".\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 20</code></li>\n\t<li><code>1 <= p.length <= 20</code></li>\n\t<li><code>s</code> contains only lowercase English letters.</li>\n\t<li><code>p</code> contains only lowercase English letters, <code>'.'</code>, and <code>'*'</code>.</li>\n\t<li>It is guaranteed for each appearance of the character <code>'*'</code>, there will be a previous valid character to match.</li>\n</ul>\n",
|
||||
"content": "<p>Given an input string <code>s</code> and a pattern <code>p</code>, implement regular expression matching with support for <code>'.'</code> and <code>'*'</code> where:</p>\n\n<ul>\n\t<li><code>'.'</code> Matches any single character.</li>\n\t<li><code>'*'</code> Matches zero or more of the preceding element.</li>\n</ul>\n\n<p>The matching should cover the <strong>entire</strong> input string (not partial).</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "aa", p = "a"\n<strong>Output:</strong> false\n<strong>Explanation:</strong> "a" does not match the entire string "aa".\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "aa", p = "a*"\n<strong>Output:</strong> true\n<strong>Explanation:</strong> '*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes "aa".\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = "ab", p = ".*"\n<strong>Output:</strong> true\n<strong>Explanation:</strong> ".*" means "zero or more (*) of any character (.)".\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= s.length <= 20</code></li>\n\t<li><code>1 <= p.length <= 20</code></li>\n\t<li><code>s</code> contains only lowercase English letters.</li>\n\t<li><code>p</code> contains only lowercase English letters, <code>'.'</code>, and <code>'*'</code>.</li>\n\t<li>It is guaranteed for each appearance of the character <code>'*'</code>, there will be a previous valid character to match.</li>\n</ul>\n",
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
|
||||
Reference in New Issue
Block a user