Skip to content
CodeWorth
CodeWorth

Code worths when shared

Primary Navigation Menu
Menu
  • BLOG
    • DataBase
    • Programming
    • Mobile
    • Multimedia
    • OS Tips
    • Others
    • Web Development
  • Products
    • Utilities
    • Games
    • JsGenLib
      • PlugIns
      • Core Functions
      • Helper & ShortHands
  • About

A Small and Short RegEx Reference

On April 13, 2011
In Web Development
Tagged Regular Expressions, Web
With 0 Comments
As We all Know that RegEx (Regular Expressions) is Leading Validation Technique Used in Many of Web,RUI.. application development, I just Like to provide a brief on it.

Here it follows
Regular Expression Will match…
txt The string “txt”
^txt “txt” at the start of a string
txt$ “txt” at the end of a string
^txt$ “txt” when it is alone on a string
[abc] a, b, or c
[a-z] Any lowercase letter
[^A-Z] Any character that is not a uppercase letter
(gif|jpg) Matches either “gif” or “jpeg”
[a-z]+ One or more lowercase letters
[0-9\.\-] Any number, dot, or minus sign
^[a-zA-Z0-9_]{1,}$ Any word of at least one letter, number or _
([wx])([yz]) wy, wz, xy, or xz
[^A-Za-z0-9] Any symbol (not a number or a letter)
([A-Z]{3}|[0-9]{4}) Matches three letters or four numbers


2011-04-13

Subscribe

Enter your email address to receive notifications about new posts via email.

Join 634 other subscribers

Google

Designed using Chromatic WordPress Theme. Powered by WordPress.