Jump to content

Regular Expressions (Regex)


Jorsh

Recommended Posts

I love the site and refer 5 to 10 people per week to learn about HTML and CSS.One addition that I think would benefit many folks is a regex tutorial. I think with TryIt, W3Schools could be the premier site for learning about regular expressions.Thanks!

Link to comment
Share on other sites

What do you mean by "regular expressions"? Some kind of info? Anything?

Link to comment
Share on other sites

Yeah, regular expressions are great for validating form input on web forms.^(\d{5}$|\d{5}-\d{4}$ would only match input that is in valid US zip code format.^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z]*[a-zA-Z]$ could be used to validate that the user entered in a correctly formated email address.There are many sites on the Internet devoted to regular expressions, I just think it'd be a great addition to this site.

Link to comment
Share on other sites

Yes this could be useful, it could include:a list of all the charactersa short description on there purposea short example of how the character is usedIn javascript for example:Character = ^Purpose = maches only from the beginning of a lineExample1 = /^c/ matches c in cornExample2 = /^c/ does not match c in acornthen go onto more complicated examples, like validating an email address etc.Thumbs up (only one thing, i don't think it would be considered a high priority)

Link to comment
Share on other sites

I agree completely. Regex is one thing I've always wanted to learn, as it's come up many times during my work with JavaScript. But like Scott said, I think that Kaijim and his associates are slightly busy right now, so it might take a while for the tutorial to even be started. But still, great idea.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...