title: To get comma seperated selected text of Select2 dropdown.
body: <p>I have a select2 dropdown which has a list of Regions. I need a comma seperated list of selected values.</p>
  
  <pre><code> @Html.ListBox("regionSelect", regions, new { id = "regionSelect", @class = "form-control", multiple = "multiple" })
  </code></pre>
  
  <p>And the Jquery code </p>
  
  <pre><code>if ($('#regionSelect :selected').text() != "----------- Select Region ---------")
              var selected = $('#regionSelect :selected').text();
  </code></pre>
  
  <p>I get the result of selected as Region1Region2Region3. I can split them in terms of whenevr i see a 'R' and then insert comma in between. But I have a number of such listboxes, and I don't want to do it for each one.</p>
  
  <p>Is there a generic way of doing it?</p>
  
  <p>I tried <a href="https://stackoverflow.com/a/18917531/4761773">this answer</a> and it returned me undefined.</p>