title: Regex to capture hyphenated words separated by new line character
body: <p>I have a pattern such as <strong>word-\nword</strong>, i.e. words are hyphenated and separated by new line character. </p>
  
  <p>I would like the output as word-word. I get word-\nword with the below code.</p>
  
  <pre><code>    text_string = "word-\nword"
      result=re.findall("[A-Za-z]+-\n[A-Za-z]+", text_string)
      print(result)
  </code></pre>
  
  <p>I tried this, but did not work, I get no result.</p>
  
  <pre><code>   text_string = "word-\nword"
     result=re.findall("[A-Za-z]+-(?=\n)[A-Za-z]+", text_string)
     print(result)
  </code></pre>
  
  <p>How can I achieve this. 
  Thank You !</p>
  
  <p>Edit:</p>
  
  <p>Would it be efficient to do a replace and run a simple regex </p>
  
  <pre><code>text_string = "aaa bbb ccc-\nddd eee fff"
  replaced_text = text_string.replace('-\n', '-')
  result = re.findall("\w+-\w+",replaced_text)
  print(result) 
  </code></pre>
  
  <p>or use the method suggested by CertainPerformance</p>
  
  <pre><code>text_string = "word-\nword"
  result=re.sub("(?i)(\w+)-\n(\w+)", r'\1-\2', text_string)
  print(result)
  </code></pre>