title: Regex for every occurrence of a Pattern, which extracts entire text string between = and \s
body: <p>I am creating a program which will reformat an XML file.</p>
  <p>e.g.; The following is the XML snippet.</p>
  <pre><code>&lt;ServiceRequest actionCode=KK
            addedWithoutItinerary=false airlineCode=1S
            code=ADTK orderNumber=1 serviceCount=1
            serviceType=SSR ssrType=AFX&gt;
  </code></pre>
  <p>I want to surround all attribute values with double quotes.</p>
  <p>e.g.;</p>
  <pre><code>&lt;ServiceRequest actionCode=&quot;KK&quot;
                addedWithoutItinerary=&quot;false&quot; airlineCode=&quot;1S&quot;
                code=&quot;ADTK&quot; orderNumber=&quot;1&quot; serviceCount=&quot;1&quot;
                serviceType=&quot;SSR&quot; ssrType=&quot;AFX&quot;&gt;
  </code></pre>
  <p>Hence, I am trying to write a REGEX Pattern which can serve the purpose.</p>
  <p>I want to extract all text strings between = and single whitespace character (&quot;\s&quot;), like
  &quot;=false &quot;, &quot;=1S &quot; and so on.</p>
  <p>I tried this Pattern</p>
  <pre><code>private static final Pattern ATTR_PATTERN = Pattern.compile(&quot;(?&lt;==)(.*)(?= |\\n)&quot;);
  </code></pre>
  <p>but this Pattern is grouping all texts which has ending character as whitespace.</p>
  <p>e.g.;</p>
  <pre><code>KK
            addedWithoutItinerary=false airlineCode=1S
            code=ADTK orderNumber=1 serviceCount=1
            serviceType=SSR
  </code></pre>
  <p>Any suggestion?</p>