Hi! Please help me.<br><br>Hungarian dates are in the form yyyy. mm. dd., or yyyy. &lt;monthname&gt; dd., without leading zeros.<br>In a text environment we use the month names, so I replace numbered months with named months, and I remove leading zeros from day numbers.<br>
The line in fixes.py is, for January:<br><span style="font-family: courier new,monospace;">            (ur&#39;(\d{1,4}(?:\]\])?)\. ?01\. ?(\d\d?)&#39;, ur&#39;\1. január \2&#39;),</span><br style="font-family: courier new,monospace;">
This is OK, no problem up to this point.<br><br>The rule is that the day number has to be followed by a dot, except it is followed by a hyphen and a suffix.<br>First level of enhancement is to write a dot if necessary.<br>
<ul><li>if there is a dot there, don&#39;t remove it anyway (a hyphen is often used erroneously, and I don&#39;t want to make a bigger problem)</li><li>if there is no dot, but the day is followed by a hyphen, don&#39;t put a dot</li>
<li>if there is anything but a dot or a hyphen after the day number, put a dot after the number</li></ul>I made some experiments with<font style="font-family: courier new,monospace;" size="2"> </font><span style="font-family: courier new,monospace;" class="docutils literal"><span class="pre"><font size="2">(?(id/name)yes-pattern|no-pattern)</font></span><span class="pre"> </span></span>syntax (<a href="http://docs.python.org/py3k/library/re.html">http://docs.python.org/py3k/library/re.html</a>), but with no valuable result. Can you help me? There will be further levels if this task is solved because users are very creative in making errors.<br>
Further problems are:<br><ul><li>Hyphen is often used instead of ndash when describing an interval of two dates. In this case a dot and a space is required between the day number and the ndash. I don&#39;t want to correct this in this session or this fix if it is too difficult, but the dot should not be removed in this case (either they write a space or not).<br>
</li><li>Sometimes hyphen with no dot is correct, but there is an extra space that should be removed. This can be recognized by means of writing a limited set of suffixes after the hyphen in the regex.</li><li>Sometimes there is a word after the day but space is omitted and should be supplied.<br>
</li></ul><br>-- <br>Bináris<br>