Extract text from xml

Extract text from xml file (ignoring commented out elements) and create a one line regex.

Input


  txt123
  
  
  txt127
  txt137
  
  txt148
  

Output

^(txt123|txt127|txt137|txt148).*$