What Is a Regular Expression?
A regular expression is a sequence of characters that forms a search pattern.
When you search for data in a text, you can use this search pattern to describe what you are searching for.
A regular expression can be a single character or a more complicated pattern.
Regular expressions can be used to perform all types of text search and text replace operations.
A regular expression in JS is an object that describes a pattern of characters.
The JavaScript RegExp class represents regular expressions, and both String and RegExp define methods that use regular expressions to perform powerful pattern-matching and search-and-replace functions on the text.
Video by – Tanmay Sakpal
Simple Snippets Channel link – https://www.youtube.com/simplesnippets
Original source
34 responses to “#28 Regular Expressions in JavaScript Part 1”
Mera invalid user pe bhi action event work kr Raha hai
How stupid is this
Ur using var that's the first sign that Ur fresher
People stop watching videos of idiots who are running YouTube channels just for money sake no experience AT all …
Nd your is yukkk are you from village
why you dont traduce all the playlist?????
How to store the input data into a file
Nice video but jeez man but some subtitles on!
how to remove the invalid text after we put a correct info
Good example
Simple explanation
Awesome
nice explanation it is like playing pubg without lag
Please make video for English ,your English is amazing
the (invalid username) lalabel is not working. I removed the form action and kept it as simple form. how to debug this issue.
very informative!
here what is the type of regx
ohh..just 7 more to go:)
just half way to go:)
Sir your videos are very helpful plz also make series on es6
Bro this video has no dislikes🤔🤔wow
HI @Telusko ,i m watching ur videos regularly these are really good but i m facing an issue regarding alert function in visual code is "Function is not working" not for this video only but for previous videos also.I am coding in visual code only
<html>
<head>
<title>Regular expression page</title>
<script src='text/javascript'>
/*this program related to show regular expression powerful pattern matching
Regular expressions are case sensitive
for testing regular expression use 'regex101' website
regular expression in JS treating as object
*/
function validate(){
var uname=document.getElementById("uname").value;
var regx=/F101/;
if(regx.test(uname)){ //this is one way to use regular expression ,here test is used to check
//the expression in regx is in textbox or not
alert("valid employee name");
}
else{
window. alert("invalid employee name");
document.getElementById("lbl") .style.visibility="visible" ;
}
}
</script>
</head>
<body>
<form >
<input id="uname" type="text" placeholder="employee id"/><br>
<label id="lbl" style="color :brown; visibility:hidden "><br>Invalid Employee name</label><br>
<button type="submit" onclick="validate();">submit</button>
</form>
</body>
</html>
please help to resolve this issue
please give us the code in description and the website link
Perfection,! Well bro👏,
And It's better to have next video link too,in the description…!
dear tanmay i want u to upload html5,css3,bootstrap & jquery videos
Great Video bro. Subscribed to SImple snippets also 🙂
Thank u tanmay brother for making such a useful video. Plzz try to make video on Nodejs
it it like since 'i' is for case insensitive, 'g' is for global
and if so can we use both? and how?
Sir make a sires on php
Nice tutorial Tanmay, bhai please plan coming videos tutorial on "how to make http calls (GET/POST) via JS and shown data with the help of HTML". It will be very helpful and much appreciated by all.
Good series going on..it will be better if you sir explain topics with more and more examples..thank you sir….
How to access a CSS file, not the style attribute or tags with JavaScript?
Sir amazing explaination sir
Please upload videos on django
Sir when a new video is uploaded
Could you please suggest any book for js ?
Why are we not sent to "message.html" page which is mentioned in the action attribute of form tag ??
Could you please explain me ☺️☺️☺️
Sir when you start es6 part in JavaScript
I am first