I don't know why the regex patterns was not working ! I couldn't find any error ! But when i run this with wrong input it just skips the pattern test line and moves to the next page !  &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt;     &lt;title&gt;Validation&lt;/title&gt;     &lt;script&gt;         function validate()         {             var email=document.myform.email.value;             var pass=document.myform.pass.value;             var phno=document.myform.phno.value;             if(email!="" &amp;&amp; pass!="" &amp;&amp; phno!="")             {                 var emailcheck=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;                 var passcheck=/(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,10}/;                   var phonecheck=/^[0-9]{10}+$/;                 var result1=emailcheck.test(email);                 var result2=passcheck.test(pass);                 var result3=phonecheck.test(phno);             }             else             {                 alert("Validation failed");                 return false;             }             if(result1 &amp;&amp; result2 &amp;&amp; result3)             {                 alert("Validation Successful");                 //return true;             }             else             {                     alert("Validation Failed");                     document.write("email should be as (xxx@gmail.com)"+"&lt;br/&gt;"+"password should be as (pass123)"+"&lt;br/&gt;"+"phone should be as (98659-57575)"+"&lt;br/&gt;");                     return false;             }         }     &lt;/script&gt; &lt;/head&gt;  &lt;body&gt;     &lt;form name="myform" action="number.php" onsubmit="return validate()"&gt;     Email:&lt;input type="text" name="email"/&gt;&lt;br/&gt;     Password:&lt;input type="text" name="pass"/&gt; &lt;br/&gt;     Phone:&lt;input type="text" name="phno"/&gt; &lt;br/&gt;     &lt;input type="submit" value="submit"/&gt;     &lt;/form&gt; &lt;/body&gt; &lt;/html&gt;   I expect the alert validation failed, if I give any input that mismatch the pattern.
Is there a regular expression to validate an email address in JavaScript?
Arrow with plus/minus sign on top Below you can see an arrow with a plus and a minus sign on top of it. How is this achievable in latex? Further possibilities: arrow with only plus and arrow with only minus sign on top. How can I do this? Is there a portable version of Chrome for Ubuntu? How do you validate that two math expressions are equal? Let's say you have a few expressions like the following:  $$\begin{array}((x+17)^2 \\ x^2 + 34x + 289 \end{array} \\ 288 + \frac{x^2}{2} + \frac{x^2}{2} + 34x + 1 \\ [...] $$  You get the idea: there's an infinite number of ways of representing the same expression. The challenge is that my application is validating answers to math problems, input by math students practicing a certain concept. I'd like to make sure that whenever they submit an answer, the checker is completely insensitive to the issues of ordering, simplification, formatting etc. which would be plain frustrating. I'd also ideally like to support more than one variable such as x, y, z in the same expression.  What's a reliable way to check that two expressions are the same? The most brute force way I can think of would be to just plug a number into each variable of each expression and see what the result is.  I have a hunch however that there might be ways of getting false positives this way. That, and I might be either missing something really obvious about this, or there might be a better way of doing the comparison.  Would love to hear what you think. Are there examples of third-(or higher)-order linear differential equations in physics or applied mathematics? The classical second-order linear ordinary differential equation is that named after Sturm and Liouville: formally, \begin{equation} (pu')'=ru. \end{equation} It arises naturally in many physical situations, for example through radial considerations of Schrödinger's equation. A higher-order "analogue" of it is the Orr$-$Sommerfeld equation, which, after relabelling the coefficients, may be written as \begin{equation} (\phi u'')''=\psi u. \end{equation} It also arises naturally, namely from certain simplifications applied to Navier$-$Stokes' (in)famous equation, and describes to great accuracy the cross-stream behaviour of channel fluid flow.  I have been thinking long and hard about whether there are additional higher-order linear differential equations that emerge naturally from our mathematical models of the world. It even seems pretty much all of the linear partial differential equations (heat, wave, Schrödinger, etc.) are of second order. Does anybody know of higher-order examples? Is the sorting algorithm used by .NET's `Array.Sort()` method a stable algorithm? Is the sorting algorithm used by .NET's Array.Sort() method a  algorithm? Source shell script automatically in terminal How can I automatically source a particular shell script when I open a terminal window by right clicking somewhere and choosing "open in terminal"?  For example, every time I open a terminal I need to run the following command line:  source myscript   How can I make it so that I don't have to type this automatically?  My script is written in tsch:  #!/bin/tcsh setenv DISPLAY 127.0.0.1:10.0 cd /ast/dcm/data   I'm using CentOS 7. Is a path the set of points from a to b?  And is the stroke the "definition" (i.e. the color, shape, etc.) of the path?  And, how can you have a path with no stroke?  Is this only because it is a computer drawing program?  In the real world you can't have a path without a stroke can you?  If it matters, I am using Inkscape. How to calculate the integer part of the value of the following equation?  $$y=1+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}+\frac{1}{\sqrt{4}}+\ldots+\frac{1}{\sqrt{1000000}}$$  It should be calculated in a special way, after all the equation is so long. Put a where clause around a stored procedure I cannot edit How to compute $\int_0^{\pi/2}\frac{\sin^3 t}{\sin^3 t+\cos^3 t}dt$? I'm missing all the usual processing tools in the Vector menu in QGIS 2.16 (eg vector overlay, analysis, etc). They do appear in the processing toolbox but there's no sign of them in the Vector menu. Has anyone come across this issue? Prove by induction that $$(a_{1}+a_{2}+\cdots+a_{n})\left(\frac{1}{a_{1}}+\frac{1}{a_{2}}+\cdots+\frac{1}{a_{n}}\right)\geq n^{2}$$  where $n$ is a positive integer and $a_1, a_2,\dots, a_n$ are real positive numbers   Hence, show that  $$\csc^{2}\theta +\sec^{2}\theta +\cot^{2}\theta \geq 9\cos^{2}\theta$$  Please help me.  Thank you! Using .NET, how can you find the mime type of a file based on the file signature not the extension I have a Linux CentOS server, the OS+packages used around 5GB. Then, I transferred 97GB data from a Windows server to two folders on this Linux server, after calculated the disk usage, I see the total size of the two folders is larger than the disk used size.  Run du -sh on each folder, one use 50GB, the other one use 47GB  But run df -h, the used space is 96GB. (50GB + 47GB + 5GB) > 96GB  Is there any problem? Those two folders contain lots of files (1 million+). Thanks. How to uninstall Intel Linux Graphics Installer and revert to default drivers Does the  core rulebook contain any information that is not included already on  that would make it worth it to buy the PDF version of the manual? Or does it only have extra descriptive text? When to use (and not use) the rule of three Where do object file "Version References" come from? In 1735 Euler gave the value of $\gamma$ as $0.577218.$ The constant is generally defined as the limit of the difference between the harmonic series and $\log n:~\gamma= \lim_{n\to\infty}\sum_{k=1}^{n}\frac{1}{k}-\log n.$ Euler apparently relished this sort of calculation and must have taken quite a few terms to get such a good approximation.  My question is whether without a computer one can now prove that  $$\gamma &lt;  \sqrt{1/3}$$   with at least some savings in terms of the type of work Euler apparently expended? I don't think there's any point in raising the bar to $\gamma &lt; \ln 2\sqrt{\frac{23}{29}} $  because it seems to be the same sort of question.       My own thought was to compare $\frac{1}{2}\int_0^{1/3}\frac{dx}{\sqrt{x}}$ to something like $(-1)\cdot\int_0^\infty e^{-u}\ln u~du$ but I expect there's a better way. Continuous probability distribution with no first moment but the characteristic function is differentiable I am looking for an example of a continuous distribution function where the first moment does not exist but the characteristic function is differentiable everywhere.  Cauchy distributions do not fulfill this, as their characteristic functions are not differentiable at $0$. Does anybody here have an example?