The file consists of sorted lines, each with three numbers separated by a semicolon and followed by two or three capital letters. The first number is repeated on several consecutive lines, typically 1 .. 8 times. Here's an extract:10000006;116680003;29857009;SCT<br>
10000006;116680003;9972008;SCT<br>
10000006;363698007;51185008;SCT<br>
10000006;47429007;22253000;BT<br>
10001005;116676008;409774005;SCT<br>
10001005;116680003;87628006;SCT<br>
10001005;116680003;91302008;SCT<br>
10001005;246075003;409822003;SCT<br>
10001005;370135005;441862004;SCT<br>
10001005;47429007;23583003;BT<br>
10002003;116680003;116175006;SCT<br>
10002003;260507000;309795001;SCT<br>
10002003;260686004;129304002;SCT<br>
10002003;405813007;414003;SCT<br>
10003008;116680003;106234000;SCTThe original file had about a million such lines. I have now discovered that the crash on my PC occurs from somewhere between 5300 and 5400 lines onwards. Below 5300 lines the regex works as expected.To narrow things down, the following regex does NOT crash, not even on a miliion lines:^(\d+?);(\d+?);(\d+?);[BCST]+\n(.*?\n)\1But this one does:^(\d+?);(\d+?);(\d+?);[BCST]+\n(.*?\n)*\1<br>
 <br>
<br>
    On Friday, 25 August 2017, 10:34, elextr <notifications@github.com> wrote:<br>
 <br>
<br>
 @Chayyoo then you need to post a gist with a small file where it does happen because, as @codebrainz said, we can't reproduce it with any of our files.—<br>
You are receiving this because you were mentioned.<br>
Reply to this email directly, view it on GitHub, or mute the thread.  <br>
<br>
   

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1586#issuecomment-325291663">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ1eU0vhgLOGyGqWWgQ5lSlZ1xImyks5scnihgaJpZM4PBFk2">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ8MBOxdYPWfk2EJIMM_3UbNn5tqgks5scnihgaJpZM4PBFk2.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1586#issuecomment-325291663"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@Chayyoo in #1586: The file consists of sorted lines, each with three numbers separated by a semicolon and followed by two or three capital letters. The first number is repeated on several consecutive lines, typically 1 .. 8 times. Here's an extract:10000006;116680003;29857009;SCT\n10000006;116680003;9972008;SCT\n10000006;363698007;51185008;SCT\n10000006;47429007;22253000;BT\n10001005;116676008;409774005;SCT\n10001005;116680003;87628006;SCT\n10001005;116680003;91302008;SCT\n10001005;246075003;409822003;SCT\n10001005;370135005;441862004;SCT\n10001005;47429007;23583003;BT\n10002003;116680003;116175006;SCT\n10002003;260507000;309795001;SCT\n10002003;260686004;129304002;SCT\n10002003;405813007;414003;SCT\n10003008;116680003;106234000;SCTThe original file had about a million such lines. I have now discovered that the crash on my PC occurs from somewhere between 5300 and 5400 lines onwards. Below 5300 lines the regex works as expected.To narrow things down, the following regex does NOT crash, not even on a miliion lines:^(\\d+?);(\\d+?);(\\d+?);[BCST]+\\n(.*?\\n)\\1But this one does:^(\\d+?);(\\d+?);(\\d+?);[BCST]+\\n(.*?\\n)*\\1\n \n\n    On Friday, 25 August 2017, 10:34, elextr \u003cnotifications@github.com\u003e wrote:\n \n\n @Chayyoo then you need to post a gist with a small file where it does happen because, as @codebrainz said, we can't reproduce it with any of our files.—\nYou are receiving this because you were mentioned.\nReply to this email directly, view it on GitHub, or mute the thread.  \n\n   "}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1586#issuecomment-325291663"}}}</script>