0
SC WEB DEV
Regular Expressions

©2014 Odden Creative Media, used under a Creative Commons
Attribution-ShareAlike license: ...
WELCOME

• Introductions	

• Regular
• Topics

Expressions	


for discussion	


• Networking

©2014 Odden Creative Media, ...
REGEX
• RegEx

== Regular Expressions	


• “In

computing, a regular expression is a sequence of characters that forms a s...
REGEX :: EMAIL VALIDATION
• The

local-part of the e-mail address may use any of these ASCII characters:	


• Uppercase
• ...
REGEX :: EMAIL VALIDATION (CONT.)

• The

component hostname labels may contain 	


• only ASCII
• digits

letters a-z (ca...
REGEX :: HOWEVER!!!!!

• These

rules change drastically now that international characters are allowed.	


• mdoe@⽇日本.com	...
HERE BE DRAGONS
•

Regular-Expressions.info	

•

•

JavaScript email validation	

•

•

http://www.jquery4u.com/snippets/j...
Upcoming SlideShare
Loading in...5
×

Santa Cruz Web Developers :: Regular Expressions

88

Published on

A basic overview of Regular Expressions and how it can be used with JavaScript, and other languages for Domains, integers and much more.

Published in: Technology, Sports
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
88
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Santa Cruz Web Developers :: Regular Expressions"

  1. 1. SC WEB DEV Regular Expressions ©2014 Odden Creative Media, used under a Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/ odden creative media
  2. 2. WELCOME • Introductions • Regular • Topics Expressions for discussion • Networking ©2014 Odden Creative Media, used under a Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/ odden creative media
  3. 3. REGEX • RegEx == Regular Expressions • “In computing, a regular expression is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching.” - Wikipedia • Used for validation, find & replace, search • e.g. • Many email, credit card, phone number validations libraries have RegEx built in, and you can too with practice ©2014 Odden Creative Media, used under a Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/ odden creative media
  4. 4. REGEX :: EMAIL VALIDATION • The local-part of the e-mail address may use any of these ASCII characters: • Uppercase • Digits and lowercase English letters (a-z, A-Z) 0 to 9 • Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~ • Character . (dot, period, full stop) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively. ©2014 Odden Creative Media, used under a Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/ odden creative media
  5. 5. REGEX :: EMAIL VALIDATION (CONT.) • The component hostname labels may contain • only ASCII • digits letters a-z (case insensitive) 0-9 • hyphen (-) ©2014 Odden Creative Media, used under a Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/ odden creative media
  6. 6. REGEX :: HOWEVER!!!!! • These rules change drastically now that international characters are allowed. • mdoe@⽇日本.com • jdoe@fahrvergnügen.net • Use common sense for who the users of the site will be and adjust accordingly ©2014 Odden Creative Media, used under a Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/ odden creative media
  7. 7. HERE BE DRAGONS • Regular-Expressions.info • • JavaScript email validation • • http://www.jquery4u.com/snippets/javascript-validate-email-address-regex/ jQuery basic RegEx • • http://www.regular-expressions.info/ http://www.jquery4u.com/syntax/jquery-basic-regex-selector-examples/ RegEx One • `http://regexone.com/ ©2014 Odden Creative Media, used under a Creative Commons Attribution-ShareAlike license: http://creativecommons.org/licenses/by-sa/3.0/ odden creative media
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×