title: Regex XML Selection Extract Element
body: <p>I am trying make a regex selection starting from <code>BYPASS 0 0 0</code> up to and including the section where it says <code>WAK 0 0</code>  Here is what I have <code>(?s)(?=BYPASS).*?(WAK....)</code> I think my syntax for python use is incorrect also here is how I use it in python script <code>re.split(r'(?s)(?=BYPASS).*?(WAK....)', r)</code>  I believe this is causing the problem for me <code>(?s)</code> resulting with incorrect regex selections.</p>
  <pre><code>&lt;REAPER_PROJECT 0.1 &quot;6.66/win64&quot; 1661879469
    &lt;NOTES 0 2
    &gt;
    RIPPLE 0
    GROUPOVERRIDE 0 0 0
    AUTOXFADE 129
    ENVATTACH 3
    POOLEDENVATTACH 0
    MIXERUIFLAGS 11 48
    PEAKGAIN 1
    FEEDBACK 0
    PANLAW 1
    PROJOFFS 0 0 0
    MAXPROJLEN 0 600
    GRID 3199 8 1 8 1 0 0 0
    TIMEMODE 1 5 -1 30 0 0 -1
    VIDEO_CONFIG 0 0 256
    PANMODE 3
    CURSOR 0
    ZOOM 100 0 0
    VZOOMEX 6 0
    USE_REC_CFG 0
    RECMODE 1
    SMPTESYNC 0 30 100 40 1000 300 0 0 1 0 0
    LOOP 0
    LOOPGRAN 0 4
    RECORD_PATH &quot;&quot; &quot;&quot;
    &lt;RECORD_CFG
      ZXZhdxgAAA==
    &gt;
    &lt;APPLYFX_CFG
    &gt;
    RENDER_FILE &quot;&quot;
    RENDER_PATTERN mask
    RENDER_FMT 0 2 44100
    RENDER_1X 0
    RENDER_RANGE 1 0 0 16 1000
    RENDER_RESAMPLE 3 0 1
    RENDER_ADDTOPROJ 0
    RENDER_STEMS 2048
    RENDER_DITHER 0
    TIMELOCKMODE 1
    TEMPOENVLOCKMODE 1
    ITEMMIX 1
    DEFPITCHMODE 589824 0
    TAKELANE 1
    SAMPLERATE 44100 0 0
    &lt;RENDER_CFG
      ZXZhdyAAAA==
    &gt;
    LOCK 1
    &lt;METRONOME 6 2
      VOL 0.25 0.125
      FREQ 800 1600 1
      BEATLEN 4
      SAMPLES &quot;&quot; &quot;&quot;
      PATTERN 2863311530 2863311529
      MULT 1
    &gt;
    GLOBAL_AUTO -1
    TEMPO 120 4 4
    PLAYRATE 1 0 0.25 4
    SELECTION 0 0
    SELECTION2 0 0
    MASTERAUTOMODE 0
    MASTERTRACKHEIGHT 0 0
    MASTERPEAKCOL 16576
    MASTERMUTESOLO 0
    MASTERTRACKVIEW 0 0.6667 0.5 0.5 -1 -1 -1 0 0 0 -1 -1 0
    MASTERHWOUT 0 0 1 0 0 0 0 -1
    MASTER_NCH 2 2
    MASTER_VOLUME 1 0 -1 -1 1
    MASTER_PANMODE 3
    MASTER_FX 1
    MASTER_SEL 0
    &lt;MASTERPLAYSPEEDENV
      EGUID {07BFCFC9-6DA0-4D9C-8821-7D1555F3F3F8}
      ACT 0 -1
      VIS 0 1 1
      LANEHEIGHT 0 0
      ARM 0
      DEFSHAPE 0 -1 -1
    &gt;
    &lt;TEMPOENVEX
      EGUID {9059CD91-68BB-42A7-8E08-BCDDCB3AC50B}
      ACT 0 -1
      VIS 1 0 1
      LANEHEIGHT 0 0
      ARM 0
      DEFSHAPE 1 -1 -1
    &gt;
    &lt;PROJBAY
    &gt;
    &lt;TRACK {7233B3F7-03A2-4203-B516-704EFF3393E3}
      NAME dac
      PEAKCOL 16576
      BEAT -1
      AUTOMODE 0
      VOLPAN 1 0 -1 -1 1
      MUTESOLO 0 0 0
      IPHASE 0
      PLAYOFFS 0 1
      ISBUS 0 0
      BUSCOMP 0 0 0 0 0
      SHOWINMIX 1 0.6667 0.5 1 0.5 -1 -1 -1
      SEL 0
      REC 0 0 1 0 0 0 0 0
      VU 2
      TRACKHEIGHT 138 0 0 0 0 0
      INQ 0 0 0 0.5 100 0 0 100
      NCHAN 4
      FX 1
      TRACKID {7233B3F7-03A2-4203-B516-704EFF3393E3}
      PERF 0
      MIDIOUT -1
      MAINSEND 1 0
      &lt;FXCHAIN
        WNDRECT 330 364 511 642
        SHOW 0
        LASTSEL 2
        DOCKED 0
        BYPASS 0 0 0
        &lt;VST &quot;VST: FreeG (Sonalksis)&quot; &quot;Sonalksis FreeG Stereo (64 bit).dll&quot; 0 &quot;&quot; 1181894483&lt;56535446724753667265656700000000&gt; &quot;&quot;
          U0dyRu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAAAAAAAPAAAAAEAAAAAABAA
          aH5iPgAAAD8AAAAAAAAAAAAAAAAAAAA/AAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA
          AE5vbmUAEAAAAA==
        &gt;
        PRESETNAME None
        FLOATPOS 0 0 0 0
        FXID {B7036F0D-9C41-461A-B1F6-CEB9D441E7EF}
        WAK 0 0
        BYPASS 0 0 0
        &lt;VST &quot;VST: FreeG (Sonalksis)&quot; &quot;Sonalksis FreeG Stereo (64 bit).dll&quot; 0 &quot;&quot; 1181894483&lt;56535446724753667265656700000000&gt; &quot;&quot;
          U0dyRu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAAAAAAAPAAAAAEAAAAAABAA
          uDDmPQAAAD8AAAAAAAAAAAAAAAAAAAA/AAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA
          AE5vbmUAEAAAAA==
        &gt;
        PRESETNAME None
        FLOATPOS 0 0 0 0
        FXID {9EEDFB75-3908-406D-BB87-69B4E868EDEA}
        WAK 0 0
        BYPASS 0 0 0
        &lt;VST &quot;VST: FreeG (Sonalksis)&quot; &quot;Sonalksis FreeG Stereo (64 bit).dll&quot; 0 &quot;&quot; 1181894483&lt;56535446724753667265656700000000&gt; &quot;&quot;
          U0dyRu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAAAAAAAPAAAAAEAAAAAABAA
          I8XFPgAAAD8AAAAAAAAAAAAAAAAAAAA/AAAAAAAAAAAAAAAAAgAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA
          AE5vbmUAEAAAAA==
        &gt;
        PRESETNAME None
        FLOATPOS 0 0 0 0
        FXID {B0417D0E-CEA3-4E1F-9BF3-7D4DCE72AC39}
        WAK 0 0
      &gt;
      &lt;ITEM
        POSITION 0
        SNAPOFFS 0
        LENGTH 14.22222222222222
        LOOP 1
        ALLTAKES 0
        FADEIN 1 0.01 0 1 0 0 0
        FADEOUT 1 0.01 0 1 0 0 0
        MUTE 0 0
        SEL 1
        IGUID {D7A853A4-5113-4456-A452-7369A41CBB08}
        IID 1
        NAME dac.wav
        VOLPAN 1 0 1 -1
        SOFFS 0
        PLAYRATE 1 1 0 -1 0 0.0025
        CHANMODE 0
        GUID {723895C2-2164-4743-9EAD-77CD9086FD1A}
        &lt;SOURCE WAVE
          FILE &quot;dac.wav&quot;
        &gt;
      &gt;
    &gt;
  &gt;
  
  </code></pre>