title: How to use lists in new regex when the items have re.escape characters?
body: <p>I'm trying to use the List option in the new <a href="https://pypi.python.org/pypi/regex" rel="nofollow noreferrer">regex</a> library. The List works fine if the items in the list do not contain any re escape characters. But it doesn't work when there are re escape characters as shown below. What is the right way to use Lists in this case.</p>
  
  <pre><code>import regex as re
  
  print('=====Test case0=====')
  mys="|abcxyz |defblah"
  l={re.escape('|abc'),re.escape('|def')}
  
  p=re.compile(r'(?=\|abc|\|def)\|.+?(?:\b|$)')          #WORKS
  print(p.findall(mys))
  
  p=re.compile(r'(?=\L&lt;l&gt;)\|.+?(?:\b|$)',l=l)            #DOESN'T WORK
  print(p.findall(mys))
  
  
  print('=====Test case1=====')
  mys="$abcxyz $defblah"
  l={re.escape('$abc'),re.escape('$def')}
  
  p=re.compile(r'(?=\$abc|\$def)\$.+?(?:\b|$)')          #WORKS
  print(p.findall(mys))
  
  p=re.compile(r'(?=\L&lt;l&gt;)\$.+?(?:\b|$)',l=l)            #DOESN'T WORK
  print(p.findall(mys))
  
  print('=====Test case2=====')
  mys="abcxyz defblah"
  l={re.escape('abc'),re.escape('def')}
  
  p=re.compile(r'(?=abc|def).+?(?:\b|$)')               #WORKS
  print(p.findall(mys))
  
  p=re.compile(r'(?=\L&lt;l&gt;).+?(?:\b|$)',l=l)             #WORKS
  print(p.findall(mys))
  </code></pre>
  
  <hr>
  
  <p><strong>output</strong></p>
  
  <pre><code>=====Test case0=====
  ['|abcxyz', '|defblah']
  []
  =====Test case1=====
  ['$abcxyz', '$defblah']
  []
  =====Test case2=====
  ['abcxyz', 'defblah']
  ['abcxyz', 'defblah']
  </code></pre>