mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 15:00:18 +00:00
class=nd fiddling
This commit is contained in:
Regular → Executable
+1
-1
@@ -225,7 +225,7 @@ body{counter-reset:h1 4}
|
||||
</ol>
|
||||
<aside>(A|B) matches either pattern A or pattern B.</aside>
|
||||
<p>The expression for the ones place follows the same pattern. I’ll spare you the details and show you the end result.
|
||||
<pre class=screen>
|
||||
<pre class='nd screen'>
|
||||
<samp class=p>>>> </samp><kbd class=pp>pattern = '^M?M?M?(CM|CD|D?C?C?C?)(XC|XL|L?X?X?X?)(IX|IV|V?I?I?I?)$'</kbd>
|
||||
</pre><p>So what does that look like using this alternate <code>{n,m}</code> syntax? This example shows the new syntax.
|
||||
<pre class=screen>
|
||||
|
||||
Reference in New Issue
Block a user