how to include qutoes + double quotes in ng-regex?
<p>I have phonegap application developed in android studio.  </p>

<p>I have an input field that has to allow abc characters, quotes and double quotes.<br>
wanted html code:</p>

<pre><code> &lt;input placeholder="last name" type="text" ng-model="currentUser.LastName"
                       ng-pattern='/^([A-Za-z\"\' ]){1,45}$/'
                       required
                       class="form-control"/&gt;
</code></pre>

<p>but I have a problem - the quotes in the regex close the whole regex.<br>
what I can do:</p>

<pre><code>ng-pattern='/^([A-Za-z\" ]){1,45}$/'
</code></pre>

<p>or</p>

<pre><code>ng-pattern="/^([A-Za-z\' ]){1,45}$/"
</code></pre>

<p>but I cant find way to include quotes marks and double quotes, too.</p>

<p>I tried it:</p>

<p>in scope:</p>

<pre><code>$scope.regex=/^([A-Za-z\"\' ]){1,45}$/;
</code></pre>

<p>in html page:</p>

<pre><code>&lt;input placeholder="last name" type="text" ng-model="currentUser.LastName" name="userLastName1"
                       ng-pattern='{{regex}}'
                       required
                       class="form-control"/&gt;
</code></pre>

<p>it did not work, too (my editor is android studio, maybe other editors are better?).</p>

<p>is there any way to include both quotes and double quotes in one regex?</p>