Writing regular expression in python
<p>I am weak in writing regular expressions so I'm going to need some help on the one. I need a regular expression that match to <code>section 7.01</code> and then <code>(a)</code></p>

<p>Basically with <code>section</code> can be followed by any number like <code>6.1</code>/<code>7.1</code>/<code>2.1</code></p>

<p>Examples:</p>

<pre><code>SECTION 7.01. Events of Default. If any of the following events
("Events of Default") shall occur:
          (a) any Borrower shall fail to pay any principal of any Loan when and
     as the same shall become due and payable, whether at the due date thereof
     or at a date fixed for prepayment thereof or otherwise;
</code></pre>

<p>I am trying to write an regular expression which can give me groups which contains these</p>

<p>Group 1</p>

<pre><code>SECTION 7.01. Events of Default. If any of the following events
("Events of Default") shall occur:
</code></pre>

<p>Group 2</p>

<pre><code>(a) any Borrower shall fail to pay any principal of any Loan when and
     as the same shall become due and payable, whether at the due date thereof
     or at a date fixed for prepayment thereof or otherwise;
</code></pre>

<p>Also there can be more points after <code>(a)</code> like <code>b</code> and so on.</p>

<p>Please help me out in writing an regular expression.</p>

<p>In an effort to help you learn, should you have to write another set of regex, I would recommend you check out the docs below:
<a href="https://docs.python.org/3/howto/regex.html#regex-howto" rel="nofollow">https://docs.python.org/3/howto/regex.html#regex-howto</a></p>

<p>This is the "easy" introduction to python regex. Essentially, you're going to define a pattern, and use the above link as a reference to build your pattern as you need it. Then, call the pattern to apply it to whatever needs processing. </p>

python regex