PageRenderTime 280ms queryTime 33ms sortTime 0ms getByIdsTime 37ms findMatchingLines 98ms

100+ results results for 'email address regex' (280 ms)

Not the results you expected?
Validation.scala git://github.com/playframework/Play20.git | Scala | 226 lines
                    
68  /**
                    
69   * Defines an ‘emailAddress’ constraint for `String` values which will validate email addresses.
                    
70   *
                    
74  private val emailRegex = """^[a-zA-Z0-9\.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$""".r
                    
75  def emailAddress: Constraint[String] = Constraint[String]("constraint.email") { e =>
                    
76    if (e == null) Invalid(ValidationError("error.email"))
                    
77    else if (e.trim.isEmpty) Invalid(ValidationError("error.email"))
                    
78    else emailRegex.findFirstMatchIn(e)
                    
79      .map(_ => Valid)
                    
148   */
                    
149  def pattern(regex: => scala.util.matching.Regex, name: String = "constraint.pattern", error: String = "error.pattern"): Constraint[String] = Constraint[String](name, () => regex) { o =>
                    
150    require(regex != null, "regex must not be null")
                    
153
                    
154    if (o == null) Invalid(ValidationError(error, regex)) else regex.unapplySeq(o).map(_ => Valid).getOrElse(Invalid(ValidationError(error, regex)))
                    
155  }
                    
                
newuser.php http://globalban-spanish.googlecode.com/svn/globalban/ | PHP | 228 lines
                    
83	// Simplified version that does not do dns validation
                    
84	if(!$userQueries->emailExist($email) && !empty($email)) {
                    
85		if(preg_match("/^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$/i", $email)) {
                    
92	// Check if it matches the email address
                    
93	if($vemail == $email) {
                    
94		$valid['vemail'] = true;
                    
128// Redirect if everything works
                    
129if($valid['username'] && $valid['email'] && $valid['vemail'] && $valid['password'] && $valid['steamId'] && $valid['userCode']) {
                    
130  // Always add the user as a member
                    
191  			<td class="rowColor1">*<?php echo $LAN_NEWUSER_012; ?>:</td>
                    
192  			<td class="rowColor1"><input type="text" name="email" value="<?php if(!empty($email)) { echo $email; } ?>" size="60" maxlength="80" />
                    
193  			<?php if(!$valid['email'] && !$nopost) { ?><span class="error"><?php echo $LAN_NEWUSER_013; ?></span><?php } ?></td>
                    
197  			<td class="rowColor2"><input type="text" name="vemail" value=""  size="60" maxlength="80" />
                    
198  			<?php if(!$valid['vemail'] && !empty($email) && !$nopost) { ?><span class="error"><?php echo $LAN_NEWUSER_015; ?></span><?php } ?></td>
                    
199  		</tr>
                    
                
validators.py https://bitbucket.org/neithere/doqu/ | Python | 396 lines
                    
77    'Exists', 'exists',
                    
78    'IPAddress', 'ip_address',
                    
79    'Length', 'length',
                    
82    'Required', 'required',
                    
83    'Regexp', 'regexp',
                    
84    'URL', 'url',
                    
292    """
                    
293    Validates an email address. Note that this uses a very primitive regular
                    
294    expression and should only be used in instances where you later verify by
                    
384exists = Exists
                    
385ip_address = IPAddress
                    
386length = Length
                    
389required = Required
                    
390regexp = Regexp
                    
391# TODO: unique = Unique
                    
                
ciabot.pl http://cia-vc.googlecode.com/svn/trunk/ | Perl | 289 lines
                    
17# This program is designed to run as the .git/hooks/post-commit hook. It takes
                    
18# the commit information, massages it and mails it to the address given below.
                    
19#
                    
43use strict;
                    
44use vars qw ($project $from_email $dest_email $noisy $rpc_uri $sendmail
                    
45		$xml_rpc $ignore_regexp $alt_local_message_target);
                    
54
                    
55# The from address in generated mails.
                    
56$from_email = 'pasky@ucw.cz';
                    
57
                    
58# Mail all reports to this address.
                    
59$dest_email = 'cia@cia.vc';
                    
80
                    
81# This variable should contain a regexp, against which each file will be
                    
82# checked, and if the regexp is matched, the file is ignored. This can be
                    
                
html.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 428 lines
                    
143	 *
                    
144	 * @param   string  email address
                    
145	 * @return  string
                    
146	 */
                    
147	public static function email($email)
                    
148	{
                    
168	 *
                    
169	 * @param   string  email address to send to
                    
170	 * @param   string  link text
                    
181		{
                    
182			// Extract the parameters from the email address
                    
183			list ($email, $params) = explode('?', $email, 2);
                    
196
                    
197		// Title defaults to the encoded email address
                    
198		empty($title) and $title = $safe;
                    
                
Valid.php git://github.com/kohana/core.git | PHP | 551 lines
                    
100	/**
                    
101	 * Check an email address for correct format.
                    
102	 *
                    
105	 *
                    
106	 * @param   string  $email  email address
                    
107	 * @param   boolean $strict strict RFC compatibility
                    
141	/**
                    
142	 * Validate the domain of an email address by checking if the domain has a
                    
143	 * valid MX record.
                    
146	 *
                    
147	 * @param   string  $email  email address
                    
148	 * @return  boolean
                    
149	 */
                    
150	public static function email_domain($email)
                    
151	{
                    
                
archetype_editor.js git://github.com/openmelody/melody.git | JavaScript | 440 lines
                    
99    
                    
100    editEmail: function( linkElement ) {
                    
101        this.createEmailLink( linkElement.href, true, linkElement );
                    
104
                    
105    mailtoRegexp: /^mailto:/i,
                    
106
                    
115
                    
116        url = prompt( Editor.strings.enterEmailAddress, url );
                    
117        if( !url )
                    
431        path = path.replace(/(.*)editor-content.html.*/, "$1");
                    
432        var regex = new RegExp(path, "g");
                    
433        html = html.replace(regex, "");
                    
434        /* XXX for save on ff */
                    
435        regex = new RegExp(path.replace(/~/, "%7E"), "g");
                    
436        html = html.replace(regex, "");
                    
                
TaQLNodeHandler.h http://casacore.googlecode.com/svn/trunk/ | C Header | 311 lines
                    
18//#
                    
19//# Correspondence concerning AIPS++ should be addressed as follows:
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
21//#        Postal address: AIPS++ Project Office
                    
22//#                        National Radio Astronomy Observatory
                    
105  virtual TaQLNodeResult visitConstNode    (const TaQLConstNodeRep& node);
                    
106  virtual TaQLNodeResult visitRegexNode    (const TaQLRegexNodeRep& node);
                    
107  virtual TaQLNodeResult visitUnaryNode    (const TaQLUnaryNodeRep& node);
                    
                
autoreply.pl git://github.com/webmin/webmin.git | Perl | 476 lines
                    
118			if ($1 eq "No-Autoreply-Regexp") {
                    
119				push(@no_regexp, $2);
                    
120				}
                    
120				}
                    
121			elsif ($1 eq "Must-Autoreply-Regexp") {
                    
122				push(@must_regexp, $2);
                    
197# Check if there is a deny list, and if so don't send a reply
                    
198@fromsplit = &split_addresses($header{'from'});
                    
199if (@fromsplit) {
                    
214
                    
215# Check if message matches one of the deny regexps, or doesn't match a
                    
216# required regexp
                    
372# split_addresses(string)
                    
373# Splits a comma-separated list of addresses into [ email, real-name, original ]
                    
374# triplets
                    
                
jquery.mb.mediaEmbedder.js http://mbideasproject.googlecode.com/svn/trunk/ | JavaScript | 202 lines
                    
30    },
                    
31    regEx:/\[(.*?)\]/g,
                    
32    mb_setMovie:function(context,address,string){
                    
34        var skip = 0;
                    
35        if(address.indexOf("&AMP;")!=-1) address=address.replace(/&AMP;/g,"&");
                    
36        if (node.nodeType == 3) {
                    
63
                    
64      var movies= $(this).html().match($.mb_videoEmbedder.regEx);
                    
65      if(!movies) return;
                    
66      $(movies).each(function(i){
                    
67        var address=movies[i];
                    
68
                    
170
                    
171      var audiofiles= $(this).html().match($.mb_audioEmbedder.regEx);
                    
172      if(!audiofiles) return;
                    
                
FTLocationFactory.pm git://github.com/bioperl/bioperl-live.git | Perl | 376 lines
                    
60reponsive experts will be able look at the problem and quickly 
                    
61address it. Please include a thorough description of the problem 
                    
62with code and data examples if at all possible.
                    
73
                    
74Email hlapp at gmx.net
                    
75
                    
104BEGIN {
                    
105    # the below is an optimized regex obj. from J. Freidl's Mastering Reg Exp.
                    
106    $LOCREG = qr{
                    
                
mstats.fillups.tests.js https://hg01.codeplex.com/atha | JavaScript | 225 lines
                    
11// The example companies, organizations, products, domain names,
                    
12// e-mail addresses, logos, people, places, and events depicted
                    
13// herein are fictitious.  No association with any real company,
                    
13// herein are fictitious.  No association with any real company,
                    
14// organization, product, domain name, email address, logo, person,
                    
15// places, or events is intended or should be inferred.
                    
16//===================================================================================
                    
17/*jslint onevar: true, undef: true, newcap: true, regexp: true, plusplus: true, bitwise: true, devel: true, maxerr: 50 */
                    
18(function ($) {
                    
                
lang_user_search.php http://torrentpier2.googlecode.com/svn/trunk/ | PHP | 109 lines
                    
23$lang['SEARCH_INVALID_USERNAME'] = 'Invalid username entered to Search';
                    
24$lang['SEARCH_INVALID_EMAIL'] = 'Invalid email address entered to Search';
                    
25$lang['SEARCH_INVALID_IP'] = 'Invalid IP address entered to Search';
                    
41$lang['SEARCH_FOR_USERNAME'] = 'Searching usernames matching %s';
                    
42$lang['SEARCH_FOR_EMAIL'] = 'Searching email addresses matching %s';
                    
43$lang['SEARCH_FOR_IP'] = 'Searching IP addresses matching %s';
                    
69$lang['SEARCH_USERNAME_EXPLAIN'] = 'Here you can perform a case insensitive search for usernames. If you would like to match part of the username, use * (an asterix) as a wildcard. Checking the Regular Expressions box will allow you to search based on your regex pattern.';
                    
70$lang['SEARCH_EMAIL_EXPLAIN'] = 'Enter an expression to match a user\'s email address. This is case insensitive. If you want to do a partial match, use * (an asterix) as a wildcard. Checking the Regular Expressions box will allow you to search based on your regex pattern.';
                    
71$lang['SEARCH_IP_EXPLAIN'] = 'Search for users by a specific IP address (xxx.xxx.xxx.xxx), wildcard (xxx.xxx.xxx.*) or range (xxx.xxx.xxx.xxx-yyy.yyy.yyy.yyy). Note: the last quad .255 is considered the range of all the IPs in that quad. If you enter 10.0.0.255, it is just like entering 10.0.0.* (No IP is assigned .255 for that matter, it is reserved). Where you may encounter this is in ranges, 10.0.0.5-10.0.0.255 is the same as "10.0.0.*" . You should really enter 10.0.0.5-10.0.0.254 .';
                    
84$lang['USERS_DISABLED_PMS'] = 'Users with disabled PMs';
                    
85$lang['SEARCH_USERS_MISC_EXPLAIN'] = 'Administrators - All users with Administrator powers; Moderators - All forum moderators; Banned Users - All accounts that have been banned on these forums; Disabled Users - All users with disabled accounts (either manually disabled or never verified their email address); Users with disabled PMs - Selects users who have the Private Messages priviliges removed (Done via User Management)';
                    
86$lang['POSTCOUNT'] = 'Postcount';
                    
104$lang['NOT_BANNED'] = 'Not Banned';
                    
105$lang['SEARCH_NO_RESULTS'] = 'No users match your selected criteria. Please try another search. If you\'re searching the username or email address fields, for partial matches you must use the wildcard * (an asterix).';
                    
106$lang['ACCOUNT_STATUS'] = 'Account Status';
                    
                
IUPAC.pm git://github.com/bioperl/bioperl-live.git | Perl | 561 lines
                    
36 # Get a regular expression that matches all possible sequences
                    
37 my $regexp = $iupac->regexp();
                    
38
                    
142reponsive experts will be able look at the problem and quickly 
                    
143address it. Please include a thorough description of the problem 
                    
144with code and data examples if at all possible.
                    
155
                    
156Email amackey-at-virginia.edu
                    
157
                    
507
                    
508=head2 regexp
                    
509
                    
509
                    
510 Title   : regexp
                    
511 Usage   : my $re = $iupac->regexp();
                    
                
AnnotationReaderTest.cfc git://github.com/bobsilverberg/ValidateThis.git | ColdFusion CFScript | 0 lines
                    
62				if (Validation.ValType eq "required" and Validation.PropertyName eq "UserName") {
                    
63					assertEquals(Validation.PropertyDesc,"Email Address");
                    
64				}
                    
65				if (Validation.ValType eq "email" and Validation.PropertyName eq "UserName") {
                    
66					assertEquals(Validation.PropertyDesc,"Email Address");
                    
67					assertEquals(Validation.FailureMessage,"Hey, buddy, you call that an Email Address?");
                    
126				if (Validation.ValType eq "required" and Validation.PropertyName eq "UserName") {
                    
127					assertEquals(Validation.PropertyDesc,"Email Address");
                    
128				}
                    
129				if (Validation.ValType eq "email" and Validation.PropertyName eq "UserName") {
                    
130					assertEquals(Validation.PropertyDesc,"Email Address");
                    
131					assertEquals(Validation.FailureMessage,"Hey, buddy, you call that an Email Address?");
                    
189			assertEquals(arguments.PropertyDescs.UserGroup,"User Group");
                    
190			assertEquals(arguments.PropertyDescs.UserName,"Email Address");
                    
191			assertEquals(arguments.PropertyDescs.UserPass,"Password");
                    
                
Fastq.pm git://github.com/bioperl/bioperl-live.git | Perl | 237 lines
                    
73reponsive experts will be able look at the problem and quickly 
                    
74address it. Please include a thorough description of the problem 
                    
75with code and data examples if at all possible.
                    
86
                    
87Email - avc@sanger.ac.uk
                    
88
                    
220  Function: The default Fastq ID parser for Fastq.pm
                    
221            Returns $1 from applying the regexp /^>\s*(\S+)/
                    
222            to $header.
                    
                
re.h http://vulture.googlecode.com/svn/trunk/ | C Header | 0 lines
                    
11* other questions related to licensing please contact Trustwave Holdings, Inc.
                    
12* directly using the email address security@modsecurity.org.
                    
13*/
                    
134    apr_ipsubnet_t *ipsubnet;
                    
135    const char * address;
                    
136    struct  msre_ipmatch *next;
                    
166
                    
167    ap_regex_t              *sub_regex;
                    
168    char                    *sub_str;
                    
264    msre_var_metadata       *metadata;
                    
265    msc_regex_t             *param_regex;
                    
266    unsigned int             is_negated;
                    
                
UnitMap.cc http://casacore.googlecode.com/svn/trunk/ | C++ | 425 lines
                    
18//#
                    
19//# Correspondence concerning AIPS++ should be addressed as follows:
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
21//#        Postal address: AIPS++ Project Office
                    
22//#                        National Radio Astronomy Observatory
                    
31#include <casa/Utilities/MUString.h>
                    
32#include <casa/Utilities/Regex.h>
                    
33#include <casa/iostream.h>
                    
243Unit UnitMap::fromFITS(const Unit &un) {
                    
244  static Regex sepa("[^a-zA-Z]");
                    
245  MUString mus(un.getName());
                    
266Unit UnitMap::toFITS(const Unit &un) {
                    
267  static Regex sepa("[^a-zA-Z]");
                    
268  MUString mus(un.getName());
                    
                
LinkElementGenerator.cs https://spm.svn.codeplex.com/svn | C# | 144 lines
                    
34		// (this allows accepting punctuation inside links but not at the end)
                    
35		internal readonly static Regex defaultLinkRegex = new Regex(@"\b(https?://|ftp://|www\.)[\w\d\._/\-~%@()+:?&=#!]*[\w\d/]");
                    
36		
                    
37		// try to detect email addresses
                    
38		internal readonly static Regex defaultMailRegex = new Regex(@"\b[\w\d\.\-]+\@[\w\d\.\-]+\.[a-z]{2,6}\b");
                    
39		
                    
39		
                    
40		readonly Regex linkRegex;
                    
41		
                    
52		{
                    
53			this.linkRegex = defaultLinkRegex;
                    
54			this.RequireControlModifierForClick = true;
                    
59		/// </summary>
                    
60		protected LinkElementGenerator(Regex regex) : this()
                    
61		{
                    
                
filepost_com.php http://rapidleech.googlecode.com/svn/trunk/ | PHP | 270 lines
                    
22            is_present($this->page, "File not found");
                    
23            is_present($this->page, "This IP address has been blocked on our service due to some fraudulent activity.");
                    
24            $this->Cookies = GetCookiesArr($this->page);
                    
90
                    
91        // Let's play with the regex
                    
92        if (!preg_match('@"js":\{"(\w+)":\{?"([^"]+)"?:?"?([^|\r|\n|"]+)?"\}@i', $check, $match)) html_error("Error: Unknown Post Data [FREE] page response!");
                    
129
                    
130        $email = ($_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc ["filepost_com"] ["user"]);
                    
131        $password = ($_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc ["filepost_com"] ["pass"]);
                    
131        $password = ($_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc ["filepost_com"] ["pass"]);
                    
132        if (empty($email) || empty($password)) html_error("Login failed, username or password is empty!");
                    
133
                    
134        $post = array();
                    
135        $post['email'] = $email;
                    
136        $post['password'] = $password;
                    
                
en_US.php http://rapyd-framework.googlecode.com/svn/trunk/ | PHP | 77 lines
                    
48	'val.matches'       => 'The %s field must match the %s field.',
                    
49	'val.valid_email'   => 'The %s field must contain a valid email address.',
                    
50	'val.in_range'      => 'The %s field must be between %s and %s .',
                    
50	'val.in_range'      => 'The %s field must be between %s and %s .',
                    
51	'val.regex'         => 'The %s field does not match accepted input.',
                    
52	'val.unique'	    => 'The %s field must be unique, there is another field with this value.',
                    
                
mstats.imminent-reminders.js https://hg01.codeplex.com/atha | JavaScript | 116 lines
                    
11// The example companies, organizations, products, domain names,
                    
12// e-mail addresses, logos, people, places, and events depicted
                    
13// herein are fictitious.  No association with any real company,
                    
13// herein are fictitious.  No association with any real company,
                    
14// organization, product, domain name, email address, logo, person,
                    
15// places, or events is intended or should be inferred.
                    
16//===================================================================================
                    
17/*jslint onevar: true, undef: true, newcap: true, regexp: true, plusplus: true, bitwise: true, devel: true, maxerr: 50 */
                    
18/*global jQuery */
                    
                
eml_to_csv.py https://bitbucket.org/chrisgalpin/eml-to-csv-windows-live-mail | Python | 230 lines
                    
12
                    
13    cRegEx = re.compile(regEx)
                    
14
                    
90    else:
                    
91        email = rawContact[emailBracketIdx:]
                    
92    
                    
208            email = g_email(rawContact)
                    
209            if (email.lower() in emails):
                    
210                continue
                    
210                continue
                    
211            emails.add(email.lower())
                    
212
                    
215            folder = g_folder(file, emlFolder)
                    
216            contact = {'name':name, 'email':email, 'date':date, 'subject':subject, 'folder':folder}
                    
217            contacts.append(contact)
                    
                
CommentViewBase.cs https://hg01.codeplex.com/blogengine | C# | 0 lines
                    
36        /// <summary>
                    
37        /// The link regex.
                    
38        /// </summary>
                    
38        /// </summary>
                    
39        private static readonly Regex LinkRegex =
                    
40            new Regex(
                    
41                "((http://|www\\.)([A-Z0-9.-]{1,})\\.[0-9A-Z?;~&#=\\-_\\./]{2,})", 
                    
42                RegexOptions.Compiled | RegexOptions.IgnoreCase);
                    
43*/
                    
93                    var sb = new StringBuilder();
                    
94                    sb.AppendFormat(" | <a class=\"email\" href=\"mailto:{0}\">{0}</a>", this.Comment.Email);
                    
95                    sb.AppendFormat(
                    
152        ///     <remarks>
                    
153        ///         If the country hasn't been resolved from the authors IP address or
                    
154        ///         the flag does not exist for that country, nothing is displayed.
                    
                
MYAddressField.m git://github.com/ccgus/letters.git | Objective C | 223 lines
                    
21
                    
22@synthesize defaultAddresses=_defaultAddresses, addressProperty=_property, selectedAddress=_selectedAddress;
                    
23
                    
168- (id) initWithPerson: (ABPerson*)person
                    
169          addressType: (NSString*)addressType address: (NSString*)address
                    
170{
                    
174    
                    
175    self = [self initWithName: name addressType: addressType address: address];
                    
176    if( self )
                    
197    }
                    
198    return [self initWithName: name addressType: addressType address: address];
                    
199}
                    
200
                    
201@synthesize name=_name, addressType=_addressType, address=_address;
                    
202
                    
                
fields.py http://dojango.googlecode.com/svn/trunk/ | Python | 159 lines
                    
123    
                    
124class RegexField(DojoFieldMixin, fields.RegexField):
                    
125    widget = widgets.ValidationTextInput
                    
128    def __init__(self, js_regex=None, *args, **kwargs):
                    
129        self.js_regex = js_regex
                    
130        super(RegexField, self).__init__(*args, **kwargs)
                    
146    
                    
147class EmailField(DojoFieldMixin, fields.EmailField):
                    
148    widget = widgets.EmailTextInput
                    
149    
                    
150class IPAddressField(DojoFieldMixin, fields.IPAddressField):
                    
151    widget = widgets.IPAddressTextInput
                    
157    widget = widgets.ValidationTextInput
                    
158    js_regex = '^[-\w]+$' # we cannot extract the original regex input from the python regex
                    
159
                    
                
rules-updater.pl.in http://vulture.googlecode.com/svn/trunk/ | Autoconf | 0 lines
                    
67
                    
68# Make the version into a regex
                    
69if (defined $opt{v}) {
                    
90	if ($opt{d}) {
                    
91		print STDERR "Using version regex: $opt{v}\n";
                    
92	}
                    
128  -e addr  NotifyEmail     Notify via email on update (comma separated list).
                    
129  -f addr  NotifyEmailFrom From address for notification email.
                    
130  -u       Unpack          Unpack into LocalRules/version path.
                    
192		elsif ($var eq "timeout")          { $cfg{t} = $val }
                    
193		elsif ($var eq "notifyemail")      { $cfg{e} = $val }
                    
194		elsif ($var eq "notifyemailfrom")  { $cfg{f} = $val }
                    
194		elsif ($var eq "notifyemailfrom")  { $cfg{f} = $val }
                    
195		elsif ($var eq "notifyemaildiff")  { $cfg{E} = $val }
                    
196		elsif ($var eq "unpack")           { $cfg{u} = $val }
                    
                
unigene.pm git://github.com/bioperl/bioperl-live.git | Perl | 277 lines
                    
50reponsive experts will be able look at the problem and quickly 
                    
51address it. Please include a thorough description of the problem 
                    
52with code and data examples if at all possible.
                    
63
                    
64Email: andrew at cbbc.murdoch.edu.au
                    
65
                    
145	
                    
146# set up the regexes
                    
147
                    
147
                    
148# add whitespace parsing and precompile regexes
                    
149#foreach (values %line_is) {
                    
150#	$_ =~ s/\s+/\\s+/g;
                    
151#	print STDERR "Regex is $_\n";
                    
152#	#$_ = qr/$_/x;
                    
                
registration.html.php http://miacms.googlecode.com/svn/trunk/ | PHP | 343 lines
                    
97	      <label for="email"><?php echo T_('E-mail:'); ?> *</label>
                    
98          <input type="text" id="email" name="email" size="40" value="<?php echo $email; ?>" class="inputbox" />
                    
99          </div>
                    
102	      <label for="email2"><?php echo T_('Verify E-mail:'); ?> *</label>
                    
103          <input type="text" name="email2" class="inputbox" id="email2" value="<?php echo $email; ?>" size="40" />
                    
104          </div>
                    
196    			var email       = YAHOO.miacms.base.trim(YAHOO.util.Dom.get("email").value);
                    
197    			var email2      = YAHOO.miacms.base.trim(YAHOO.util.Dom.get("email2").value);
                    
198    			var password    = YAHOO.miacms.base.trim(YAHOO.util.Dom.get("password").value);
                    
232    				YAHOO.util.Dom.get("password").focus();
                    
233    			} else if ((password !== "") && (email !== email2)){
                    
234    				alert( "$emailMatchMsg" );
                    
277          <td><?php echo T_('E-mail:'); ?> </td>
                    
278          <td><strong><?php echo $email;?></strong><input type="hidden" name="email" size="40" value="<?php echo $email;?>" /></td>
                    
279        </tr>
                    
                
utils.js git://github.com/forkcms/forkcms.git | JavaScript | 418 lines
                    
107	/**
                    
108	 * Is the value inside the element a valid emailaddress
                    
109	 *
                    
112	 */
                    
113	isEmail: function(element)
                    
114	{
                    
114	{
                    
115		var regexp = /^[a-z0-9!#\$%&'*+-\/=?^_`{|}\.~]+@([a-z0-9]+([\-]+[a-z0-9]+)*\.)+[a-z]{2,7}$/i;
                    
116		return regexp.test(element.val());
                    
148	{
                    
149		var regexp = /^((http|ftp|https):\/{2})?(([0-9a-zA-Z_-]+\.)+[0-9a-zA-Z]+)((:[0-9]+)?)((\/([~0-9a-zA-Z\#%@\.\/_-]+)?(\?[0-9a-zA-Z%@\/&=_-]+)?)?)$/i;
                    
150		return regexp.test(element.val());
                    
245		if(value == undefined) return '';
                    
246		return value.replace(new RegExp(needle, 'g'), replacement);
                    
247	},
                    
                
EmailAddress.java http://google-voice-java.googlecode.com/svn/trunk/ | Java | 106 lines
                    
40	public EmailAddress(JSONObject phonesJSON) throws JSONException {
                    
41		if(phonesJSON.has("emailAddresses")) address = phonesJSON.getString("emailAddresses");
                    
42	}
                    
49	public final static List<EmailAddress> createEmailAddressListFromJsonPartResponse(String jsonPart) { 
                    
50		List<EmailAddress> emailAddresses = new ArrayList<EmailAddress>();
                    
51		if(jsonPart!=null &! jsonPart.equals("")) {
                    
55				String gId = ParsingUtil.removeUninterestingParts(emailAddressesStrings[j], "\"", "\"", false);
                    
56				emailAddresses.add(new EmailAddress(gId));
                    
57			}
                    
77			for (int i = 0; i < addresses.length(); i++) {
                    
78				ret[i] = new EmailAddress(addresses.getString(i));
                    
79			}
                    
82				String lAddress = settingsJSON.getString("emailAddresses");
                    
83				ret = new EmailAddress[]{new EmailAddress(lAddress)};
                    
84			} catch (JSONException e2) {
                    
                
class.error.php git://github.com/tylerhall/simple-php-framework.git | PHP | 274 lines
                    
157        // Does a value match a given regex?
                    
158        public function regex($val, $regex, $id, $msg)
                    
159        {
                    
159        {
                    
160            if(preg_match($regex, $val) === 0)
                    
161            {
                    
168
                    
169        // Is an email address valid?
                    
170        public function email($val, $id = 'email')
                    
173            {
                    
174                $this->add($id, 'The email address you entered is not valid.');
                    
175                return false;
                    
                
xml_js_filter.js http://xe-core.googlecode.com/svn/trunk/ | JavaScript | 0 lines
                    
19		// {{{ add filters
                    
20		// email
                    
21		var regEmail = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
                    
22		this.cast('ADD_RULE', ['email', regEmail]);
                    
23		this.cast('ADD_RULE', ['email_address', regEmail]);
                    
24
                    
189		if ($.isFunction(rules[name])) return rules[name](value);
                    
190		if (rules[name] instanceof RegExp) return rules[name].test(value);
                    
191
                    
                
Messages.Designer.cs git://github.com/JeremySkinner/FluentValidation.git | C# | 246 lines
                    
74        /// <summary>
                    
75        ///   Looks up a localized string similar to &apos;{PropertyName}&apos; is not a valid email address..
                    
76        /// </summary>
                    
76        /// </summary>
                    
77        public static string email_error {
                    
78            get {
                    
78            get {
                    
79                return ResourceManager.GetString("email_error", resourceCulture);
                    
80            }
                    
229        /// </summary>
                    
230        public static string regex_error {
                    
231            get {
                    
231            get {
                    
232                return ResourceManager.GetString("regex_error", resourceCulture);
                    
233            }
                    
                
forms.py https://bitbucket.org/mirror/django/ | Python | 207 lines
                    
13    """
                    
14    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^\w+$',
                    
15        help_text = _("Required. 30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)."),
                    
45class UserChangeForm(forms.ModelForm):
                    
46    username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^\w+$',
                    
47        help_text = _("Required. 30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)."),
                    
98class PasswordResetForm(forms.Form):
                    
99    email = forms.EmailField(label=_("E-mail"), max_length=75)
                    
100
                    
104        """
                    
105        email = self.cleaned_data["email"]
                    
106        self.users_cache = User.objects.filter(email__iexact=email)
                    
110
                    
111    def save(self, domain_override=None, email_template_name='registration/password_reset_email.html',
                    
112             use_https=False, token_generator=default_token_generator):
                    
                
Catchall.py https://mailman.svn.sourceforge.net/svnroot/mailman | Python | 195 lines
                    
90    simple_bounce_pats = (
                    
91        (regex.compile('.*451 %s.*' % email_regexp), BOUNCE),
                    
92        (regex.compile('.*554 %s.*' % email_regexp), BOUNCE),
                    
93        (regex.compile('.*552 %s.*' % email_regexp), BOUNCE),
                    
94        (regex.compile('.*501 %s.*' % email_regexp), BOUNCE),
                    
95        (regex.compile('.*553 %s.*' % email_regexp), BOUNCE),
                    
95        (regex.compile('.*553 %s.*' % email_regexp), BOUNCE),
                    
96        (regex.compile('.*550 %s.*' % email_regexp), BOUNCE),
                    
97        (regex.compile('%s .bounced.*' % email_regexp), BOUNCE),
                    
100        (regex.compile('.*%s: User unknown.*' % email_regexp), REMOVE),
                    
101        (regex.compile('.*%s\.\.\. User unknown' % email_regexp), REMOVE))
                    
102    # patterns we can't directly extract the email (special case these)
                    
113        '^554 [^ ]+\.\.\. unknown mailer error.*$', re.I)
                    
114    separate_addr_1 = regex.compile('expanded from: %s' % email_regexp)
                    
115
                    
                
CORElist.php https://code.google.com/p/s3db/ | PHP | 349 lines
                    
5
                    
6$regexp = $GLOBALS['regexp'];
                    
7$dbstruct = $GLOBALS['dbstruct'];
                    
70										'username'=>'account_uname',
                    
71										'email'=>'account_email',
                    
72										'phone'=>'account_phone',
                    
187	
                    
188		$query_end = str_replace("and project_id ".$regexp." '".$user_project_list."'", "and subject = entity and object = 'UID' and s3db_rule.project_id = s3db_resource.project_id and (s3db_rule.project_id ".$regexp." '".$user_project_list."' or s3db_rule.permission ".$regexp." '".$user_permission_list."')", $query_end);
                    
189	
                    
208	
                    
209	$query_end = str_replace("and project_id ".$regexp." '".$user_project_list."'", "and resource_class_id ".$regexp." '".$classes_list."'", $query_end);
                    
210	
                    
240			
                    
241			$query_end = str_replace("and project_id ".$regexp." '".$user_project_list."'", " and (project_id ".$regexp." '".$user_project_list."' or permission ".$regexp." '".$user_permission_list."')", $query_end);
                    
242			
                    
                
CoreTest.php https://code.google.com/p/php-blackops-rcon/ | PHP | 463 lines
                    
147					'digit'         => ':field must be a digit',
                    
148					'email'         => ':field must be a email address',
                    
149					'email_domain'  => ':field must contain a valid email domain',
                    
151					'in_array'      => ':field must be one of the available options',
                    
152					'ip'            => ':field must be an ip address',
                    
153					'matches'       => ':field must be the same as :param1',
                    
158					'range'         => ':field must be within the range of :param1 to :param2',
                    
159					'regex'         => ':field does not match the required format',
                    
160					'url'           => ':field must be a url',
                    
                
text.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 420 lines
                    
197			// Just using \b isn't sufficient when we need to replace a badword that already contains word boundaries itself
                    
198			$regex = '(?<=\b|\s|^)'.$regex.'(?=\b|\s|$)';
                    
199		}
                    
200
                    
201		$regex = '!'.$regex.'!ui';
                    
202
                    
237	/**
                    
238	 * Converts text email addresses and anchors into links.
                    
239	 *
                    
290	/**
                    
291	 * Converts text email addresses into links.
                    
292	 *
                    
297	{
                    
298		// Finds all email addresses that are not part of an existing html mailto anchor
                    
299		// Note: The "58;" negative lookbehind prevents matching of existing encoded html mailto anchors
                    
                
RubyLexerTest.java http://xruby.googlecode.com/svn/trunk/ | Java | 1574 lines
                    
151"Usage: #{123} [--key keypair_file] name\n"	+
                    
152"  name ... ex. /C=JP/O=RRR/OU=CA/CN=NaHi/emailAddress=nahi@example.org\n" +
                    
153"EOS\n";
                    
161                            new TestingCommonToken(HERE_DOC_AFTER_EXPRESSION_SUBSTITUTION, " [--key keypair_file] name\n" +
                    
162                            "  name ... ex. /C=JP/O=RRR/OU=CA/CN=NaHi/emailAddress=nahi@example.org\n"),
                    
163                            new TestingCommonToken(LINE_BREAK, "\n", 4),
                    
212                            new TestingCommonToken(LITERAL_unless, "unless", 4),
                    
213                            new TestingCommonToken(REGEX, "{$1}\\z/o", 4),
                    
214                            new TestingCommonToken(MATCH, "=~", 4),
                    
226                            new TestingCommonToken(LITERAL_when, "when"),
                    
227                            new TestingCommonToken(REGEX, "^#/"),
                    
228                            new TestingCommonToken(FUNCTION, "raise"),
                    
                
resolv.rb git://github.com/IronLanguages/main.git | Ruby | 1931 lines
                    
231  def getaddress(name)
                    
232    each_address(name) {|address| return address}
                    
233    raise ResolvError.new("no address for #{name}")
                    
237    ret = []
                    
238    each_address(name) {|address| ret << address}
                    
239    return ret
                    
330    def getaddress(name)
                    
331      each_address(name) {|address| return address}
                    
332      raise ResolvError.new("#{@filename} has no name: #{name}")
                    
336      ret = []
                    
337      each_address(name) {|address| ret << address}
                    
338      return ret
                    
416      ret = []
                    
417      each_address(name) {|address| ret << address}
                    
418      return ret
                    
                
dist.py git://github.com/IronLanguages/main.git | Python | 1249 lines
                    
9import sys, os, re
                    
10from email import message_from_file
                    
11
                    
26
                    
27# Regex to define acceptable Distutils command names.  This is not *quite*
                    
28# the same as a Python NAME -- I don't allow leading underscores.  The fact
                    
86        ('author-email', None,
                    
87         "print the author's email address"),
                    
88        ('maintainer', None,
                    
90        ('maintainer-email', None,
                    
91         "print the maintainer's email address"),
                    
92        ('contact', None,
                    
94        ('contact-email', None,
                    
95         "print the maintainer's email address if known, else the author's"),
                    
96        ('url', None,
                    
                
macros.rb git://github.com/IronLanguages/main.git | Ruby | 458 lines
                    
31      # * <tt>:message</tt> - value the test expects to find in <tt>errors.on(:attribute)</tt>.
                    
32      #   Regexp or string.  Default = <tt>I18n.translate('activerecord.errors.messages.blank')</tt>
                    
33      #
                    
52      # * <tt>:message</tt> - value the test expects to find in <tt>errors.on(:attribute)</tt>.
                    
53      #   Regexp or string.  Default = <tt>I18n.translate('activerecord.errors.messages.taken')</tt>
                    
54      # * <tt>:scoped_to</tt> - field(s) to scope the uniqueness to.
                    
60      #   should_validate_uniqueness_of :name, :message => "O NOES! SOMEONE STOELED YER NAME!"
                    
61      #   should_validate_uniqueness_of :email, :scoped_to => :name
                    
62      #   should_validate_uniqueness_of :address, :scoped_to => [:first_name, :last_name]
                    
62      #   should_validate_uniqueness_of :address, :scoped_to => [:first_name, :last_name]
                    
63      #   should_validate_uniqueness_of :email, :case_sensitive => false
                    
64      #
                    
129      # * <tt>:message</tt> - value the test expects to find in <tt>errors.on(:attribute)</tt>.
                    
130      #   Regexp or string. If omitted, the test will pass if there is ANY error in
                    
131      #   <tt>errors.on(:attribute)</tt>.
                    
                
de.pm git://github.com/openmelody/melody.git | Perl | 7766 lines
                    
134    'Name'            => 'Name',
                    
135    'Email Address'   => 'E-Mail-Adresse',
                    
136    'URL'             => 'URL',
                    
146    'Case sensitive' => 'Groß/Kleinschreibung beachten',
                    
147    'Regex search'   => 'Reguläre Ausdrücke verwenden',
                    
148    'Tags'           => 'Tags',
                    
162    'Message from Sender:' => 'Nachricht des Absenders:',
                    
163    'You are receiving this email either because you have elected to receive notifications about new content on [_1], or the author of the post thought you would be interested. If you no longer wish to receive these emails, please contact the following person:'
                    
164      => 'Sie erhalten diese E-Mail, da Sie entweder Nachrichten über Aktualisierungen von [_1] bestellt haben oder da der Autor dachte, daß dieser Eintrag für Sie von Interesse sein könnte. Wenn Sie solche Mitteilungen nicht länger erhalten wollen, wenden Sie sich bitte an ',
                    
223## default_templates/commenter_notify.mtml
                    
224    'This email is to notify you that a new user has successfully registered on the blog \'[_1]\'. Listed below you will find some useful information about this new user.'
                    
225      => 'Ein neuer Benutzer hat sich erfolgreich für das Blog \'[_1]\' registriert. Unten finden Sie nähere Informationen über diesen Benutzer.',
                    
228    'Full Name: [_1]'       => 'Voller Name: [_1]',
                    
229    'Email: [_1]'           => 'E-Mail-Adresse:',
                    
230    'To view or edit this user, please click on or cut and paste the following URL into a web browser:'
                    
                
fields.py git://github.com/hmarr/mongoengine.git | Python | 1433 lines
                    
43    def __init__(self, regex=None, max_length=None, min_length=None, **kwargs):
                    
44        self.regex = re.compile(regex) if regex else None
                    
45        self.max_length = max_length
                    
67
                    
68        if self.regex is not None and self.regex.match(value) is None:
                    
69            self.error('String value did not match validation regex')
                    
89            elif op == 'exact':
                    
90                regex = r'^%s$'
                    
91
                    
135
                    
136    EMAIL_REGEX = re.compile(
                    
137        r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"  # dot-atom
                    
142    def validate(self, value):
                    
143        if not EmailField.EMAIL_REGEX.match(value):
                    
144            self.error('Invalid Mail-address: %s' % value)
                    
                
test_constraints.py https://bitbucket.org/sqlalchemy/sqlalchemy/ | Python | 488 lines
                    
7from test.lib.testing import eq_
                    
8from test.lib.assertsql import AllOf, RegexSQL, ExactSQL, CompiledSQL
                    
9from sqlalchemy.dialects.postgresql import base as postgresql
                    
108                          Column('last_name', String(30)),
                    
109                          Column('email_address', String(30)))
                    
110        employees.create()
                    
117        i2 = Index('employee_email_index',
                    
118                   employees.c.email_address, unique=True)
                    
119        i2.create()
                    
128                          Column('lastName', String(30)),
                    
129                          Column('emailAddress', String(30)))
                    
130
                    
137        i = Index('employeeEmailIndex',
                    
138                  employees.c.emailAddress, unique=True)
                    
139        i.create()
                    
                
forms.py http://vyperblog.googlecode.com/svn/trunk/ | Python | 322 lines
                    
48    last_name = forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'Last Name'))
                    
49    email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict,size=50,maxlength=128)),label=_(u'Email Address'))
                    
50    
                    
200                    send_mail(subject, body, from_email, to_email)
                    
201                    aMemToken = {'subject':subject,'body':body,'from_email':from_email,'to_email':to_email}
                    
202                    memcache.add(aMemKey, aMemToken, 60*60*24)
                    
211    """
                    
212    email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict,size=50,maxlength=128)),label=_(u'Email Address'))
                    
213    password1 = forms.CharField(widget=forms.PasswordInput(attrs=attrs_dict, render_value=False),label=_(u'Password'))
                    
256                    send_mail(subject, body, from_email, to_email)
                    
257                    aMemToken = {'subject':subject,'body':body,'from_email':from_email,'to_email':to_email}
                    
258                    memcache.add(aMemKey, aMemToken, 60*60*24)
                    
293        if User.all().filter('email =', email).count(1):
                    
294            raise forms.ValidationError(_(u'This email address is already in use. Please supply a different email address.'))
                    
295        return email
                    
                
widgets.py http://dojango.googlecode.com/svn/trunk/ | Python | 566 lines
                    
24    'VerticalSliderInput', 'ValidationTextInput', 'ValidationPasswordInput',
                    
25    'EmailTextInput', 'IPAddressTextInput', 'URLTextInput', 'NumberTextInput',
                    
26    'RangeBoundTextInput', 'NumberSpinnerInput', 'RatingInput', 'DateInputAnim',
                    
60        'decimal_places':'constraints.places',
                    
61        'js_regex':'regExp',
                    
62        'multiple':'multiple',
                    
361        'help_text',
                    
362        'js_regex',
                    
363        'max_length',
                    
368        if self.js_regex_func:
                    
369            attrs = self.build_attrs(attrs, regExpGen=self.js_regex_func)
                    
370        return super(ValidationTextInput, self).render(name, value, attrs)
                    
384    ]
                    
385    js_regex_func = "dojox.validate.regexp.emailAddress"
                    
386
                    
                
Infernal.pm git://github.com/bioperl/bioperl-live.git | Perl | 493 lines
                    
76
                    
77   secstructure - entire description line (in case the regex used for
                    
78                  sequence ID doesn't adequately catch the name
                    
111reponsive experts will be able look at the problem and quickly 
                    
112address it. Please include a thorough description of the problem 
                    
113with code and data examples if at all possible.
                    
124
                    
125Email cjfields-at-uiuc-dot-edu
                    
126
                    
                
SeqPattern.pm git://github.com/bioperl/bioperl-live.git | Perl | 958 lines
                    
41  -- Expanding patterns containing ambiguity codes
                    
42  -- Checking for invalid regexp characters
                    
43  -- Untainting yet preserving special characters in the pattern
                    
58against both sense and anti-sense versions of a sequence.
                    
59It is entirely equivalent to test a regexp containing both sense and
                    
60anti-sense versions of the *pattern* against one copy of the sequence.
                    
63   1) You need only one copy of the sequence.
                    
64   2) Only one regexp is executed.
                    
65   3) Regexp patterns are typically much smaller than sequences.
                    
68generate the reverse complement pattern. The Bioperl SeqPattern.pm
                    
69addresses this problem, providing a convenient set of tools
                    
70for working with biological sequence regular expressions.
                    
220my $ZED      = 'EQ';
                    
221my $Regexp_chars = '\w,.\*()\[\]<>\{\}^\$';  # quoted for use in regexps
                    
222
                    
                
VoiceMailSbb.java http://mobicents.googlecode.com/svn/trunk/ | Java | 1179 lines
                    
74import javax.slee.ActivityEndEvent;
                    
75import javax.slee.Address;
                    
76import javax.slee.AddressPlan;
                    
186				EndpointIdentifier endpointID = new EndpointIdentifier(
                    
187						PRE_ENDPOINT_NAME, mmsBindAddress + ":"
                    
188								+ MGCP_PEER_PORT);
                    
333
                    
334			String localAddress = getSipFactoryProvider().getListeningPoints()[0].getIPAddress();
                    
335			int localPort = getSipFactoryProvider().getListeningPoints()[0].getPort();
                    
336
                    
337			javax.sip.address.Address contactAddress = null;
                    
338			try {
                    
338			try {
                    
339				contactAddress = getAddressFactory().createAddress("sip:" + localAddress + ":" + localPort);
                    
340			} catch (ParseException ex) {
                    
                
cregex.h http://casacore.googlecode.com/svn/trunk/ | C Header | 308 lines
                    
1/*
                    
2    cregex.h: Extended regular expression matching and search library
                    
3    Copyright (C) 1993,1994,1995,1997,1999,2001
                    
19
                    
20    Correspondence concerning AIPS++ should be addressed as follows:
                    
21           Internet email: aips2-request@nrao.edu.
                    
21           Internet email: aips2-request@nrao.edu.
                    
22           Postal address: AIPS++ Project Office
                    
23                           National Radio Astronomy Observatory
                    
26
                    
27    $Id: cregex.h 20901 2010-06-09 07:23:37Z gervandiepen $
                    
28*/
                    
29
                    
30#ifndef CASA_CREGEX_H
                    
31#define CASA_CREGEX_H
                    
                
ADUser.cs https://hg01.codeplex.com/coursemanager | C# | 381 lines
                    
232        /// <param name="pLoginNameWithDomain">LDAP User Login Name (Domain Name Included)</param>
                    
233        /// <param name="pStreetAddress">LDAp User Street Address</param>
                    
234        /// <param name="pCity">LDAP User City</param>
                    
241        /// <param name="pFax">LDAP User Fax Number</param>
                    
242        /// <param name="pEmailAddress">LDAP User Email Address</param>
                    
243        /// <param name="pTitle">LDAP User Position Title</param>
                    
249            string pLoginNameWithDomain, string pStreetAddress, string pCity, string pState, string pPostalCode,
                    
250            string pCountry, string pHomePhone, string pExtension, string pMobile, string pFax, string pEmailAddress,
                    
251            string pTitle, string pCompany, string pManager, string pManagerName, string pDepartment)
                    
266            this.fax = pFax;
                    
267            this.emailAddress = pEmailAddress;
                    
268            this.title = pTitle;
                    
333            fax = GetProperty(directoryEntry, ADProperties.FAX);
                    
334            emailAddress = GetProperty(directoryEntry, ADProperties.EMAILADDRESS);
                    
335            title = GetProperty(directoryEntry, ADProperties.TITLE);
                    
                
2.1.0.md git://github.com/silverstripe/sapphire.git | Markdown | 172 lines
                    
65          * Optionally hide backtrace-headers in message() and show() (applied in 'showqueries')
                    
66      * Email
                    
67          * MimeType-fallback (from /etc/mime.types)
                    
67          * MimeType-fallback (from /etc/mime.types)
                    
68          * Improved validation in is_valid_address()
                    
69      * FieldSet
                    
119      * Fix insert flash
                    
120      * Fix version regex for release candidates
                    
121      * Fix delete in Files and Images section
                    
139      * The Link for a RedirectorPage points to its target
                    
140      * Add SQL_ prefix in place it was missing in Email
                    
141      * Added a check to make sure record exists before calling hasMethod on it in CheckboxSetField
                    
147      * Fixed renaming of .tar.gz and .tar.bz2 files
                    
148      * Fixed validation of DateField, EmailField and NumericField
                    
149      * Fix livesite bug for visibility handling difference between PHP5.2.0 and PHP5.1.6
                    
                
common.py https://bitbucket.org/mirror/django/ | Python | 149 lines
                    
39        if 'HTTP_USER_AGENT' in request.META:
                    
40            for user_agent_regex in settings.DISALLOWED_USER_AGENTS:
                    
41                if user_agent_regex.search(request.META['HTTP_USER_AGENT']):
                    
84        if response.status_code == 404:
                    
85            if settings.SEND_BROKEN_LINK_EMAILS:
                    
86                # If the referrer was from an internal link or a non-search-engine site,
                    
95                    mail_managers("Broken %slink on %s" % ((is_internal and 'INTERNAL ' or ''), domain),
                    
96                        "Referrer: %s\nRequested URL: %s\nUser agent: %s\nIP address: %s\n" \
                    
97                                  % (referer, request.get_full_path(), ua, ip))
                    
                
Main.cs git://github.com/chrisntr/Monotouch-Examples.git | C# | 296 lines
                    
62				webView.BackgroundColor = UIColor.White;
                    
63				var urlAddress = "http://www.google.com";
                    
64				var url = new NSUrl(urlAddress);
                    
111			#region Regular Expressions (RegEx)
                    
112			/*var emailRegex = @"^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$";
                    
113			var realEmail = "my@email.com";
                    
113			var realEmail = "my@email.com";
                    
114			var fakeEmail = "notAEmailAddress.com";
                    
115			var formatString = "{0} is a real e-mail = {1}";
                    
115			var formatString = "{0} is a real e-mail = {1}";
                    
116			Console.WriteLine ((String.Format(formatString, realEmail, Regex.IsMatch(realEmail, emailRegex))));			
                    
117			Console.WriteLine ((String.Format(formatString, fakeEmail, Regex.IsMatch(fakeEmail, emailRegex))));*/
                    
                
views.py https://code.google.com/p/pageforest/ | Python | 417 lines
                    
85            and 'resend' in request.POST and request.user):
                    
86            send_email_verification(request, request.user)
                    
87            return HttpResponse('{"resent": true}',
                    
95                              {'verification_user': user,
                    
96                               'is_verified': user and user.email_verified,
                    
97                               'error': error})
                    
160        if request.POST.get('email', '') == '':
                    
161            raise ValidationError().add_error('email', "Email address is required.")
                    
162
                    
168                    username=username,
                    
169                    email=request.POST['email'],
                    
170                    password=request.POST.get('secret', ''))
                    
229
                    
230    # TODO: Enable changing email address - send to old and new
                    
231    # and record last verified address - puts account into unverified state?
                    
                
NonKeyColumnProcessor.cs https://hg01.codeplex.com/genericdatagenerator | C# | 225 lines
                    
112                case "emailaddress":
                    
113                    returnValue = EmailAddressGenerator.GenerateEmailAddress();
                    
114                    break;
                    
115                case "regex":
                    
116                    returnValue = RegexProcessor.GenerateValue(property.ReadAttributeValue(Tokens.RegexPattern));
                    
117                    break;
                    
136                    {
                    
137                        returnValue = AddressGenerator.Addressline2(maxCharacters);
                    
138                    }
                    
145                    if (entries.Length > 1 && int.TryParse(entries[1], out maxCharacters))
                    
146                    { returnValue = AddressGenerator.Addressline3(maxCharacters); }
                    
147                    else
                    
148                    {
                    
149                        throw new Exception("The value for the addressline3 hint must follow the following pattern addressline3-5 Where the number signifies the maximum string length.");
                    
150                    }
                    
                
llpanelsnapshotpostcard.cpp https://bitbucket.org/lindenlab/mesh-development/ | C++ | 270 lines
                    
95{
                    
96	// pick up the user's up-to-date email address
                    
97	gAgent.sendAgentUserInfoRequest();
                    
131	{
                    
132		mAgentEmail = info["agent-email"].asString();
                    
133	}
                    
245
                    
246	boost::regex email_format("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
                    
247
                    
247
                    
248	if (to.empty() || !boost::regex_match(to, email_format))
                    
249	{
                    
253
                    
254	if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format))
                    
255	{
                    
                
backends.py git://github.com/reviewboard/reviewboard.git | Python | 1134 lines
                    
40
                    
41INVALID_USERNAME_CHAR_REGEX = re.compile(r'[^\w.@+-]')
                    
42
                    
53    supports_change_name = False
                    
54    supports_change_email = False
                    
55    supports_change_password = False
                    
98
                    
99    def update_email(self, user):
                    
100        """Update the user's e-mail address on the backend.
                    
407
                    
408                email = '%s@%s' % (username, settings.NIS_EMAIL_DOMAIN)
                    
409
                    
413                            last_name=last_name or '',
                    
414                            email=email)
                    
415                user.is_staff = False
                    
                
git_modified_models.diff git://github.com/reviewboard/reviewboard.git | diff | 1609 lines
                    
58@@ -79,25 +79,25 @@ class Group(models.Model):
                    
59     all review requests and replies to that address. If that e-mail address is
                    
60     blank, e-mails are sent individually to each member of that group.
                    
63-    display_name = models.CharField(_("display name"), max_length=64)
                    
64-    mailing_list = models.EmailField(_("mailing list"), blank=True,
                    
65-        help_text=_("The mailing list review requests and discussions "
                    
67+    display_name ^ models.CharField(_("display name"), max_length^64)
                    
68+    mailing_list ^ models.EmailField(_("mailing list"), blank^True,
                    
69+        help_text^_("The mailing list review requests and discussions "
                    
135-    name = models.CharField(_("name"), max_length=64)
                    
136-    file_regex = models.CharField(_("file regex"), max_length=256,
                    
137-        help_text=_("File paths are matched against this regular expression "
                    
138+    name ^ models.CharField(_("name"), max_length^64)
                    
139+    file_regex ^ models.CharField(_("file regex"), max_length^256,
                    
140+        help_text^_("File paths are matched against this regular expression "
                    
                
models.py git://github.com/reviewboard/reviewboard.git | Python | 1954 lines
                    
40    Each group can have an e-mail address associated with it, sending
                    
41    all review requests and replies to that address. If that e-mail address is
                    
42    blank, e-mails are sent individually to each member of that group.
                    
45    display_name = models.CharField(_("display name"), max_length=64)
                    
46    mailing_list = models.EmailField(
                    
47        _("mailing list"),
                    
107    A default reviewer entry automatically adds default reviewers to a
                    
108    review request when the diff modifies a file matching the ``file_regex``
                    
109    pattern specified.
                    
114
                    
115    A ``file_regex`` of ``".*"`` will add the specified reviewers by
                    
116    default for every review request.
                    
365            try:
                    
366                regex = re.compile(default.file_regex)
                    
367            except:
                    
                
models.py http://reviewboard.googlecode.com/svn/trunk/ | Python | 1104 lines
                    
68
                    
69    Each group can have an e-mail address associated with it, sending
                    
70    all review requests and replies to that address.
                    
73    display_name = models.CharField(_("display name"), max_length=64)
                    
74    mailing_list = models.EmailField(_("mailing list"), blank=True,
                    
75        help_text=_("The mailing list review requests and discussions "
                    
95    A default reviewer entry automatically adds default reviewers to a
                    
96    review request when the diff modifies a file matching the ``file_regex``
                    
97    pattern specified.
                    
106    name = models.CharField(_("name"), max_length=64)
                    
107    file_regex = models.CharField(_("file regex"), max_length=256,
                    
108        help_text=_("File paths are matched against this regular expression "
                    
316        for default in DefaultReviewer.objects.all():
                    
317            regex = re.compile(default.file_regex)
                    
318
                    
                
dist.py https://bitbucket.org/arigo/cpython-withatomic/ | Python | 1146 lines
                    
19
                    
20# Regex to define acceptable Distutils command names.  This is not *quite*
                    
21# the same as a Python NAME -- I don't allow leading underscores.  The fact
                    
77        ('author-email', None,
                    
78         "print the author's email address"),
                    
79        ('maintainer', None,
                    
81        ('maintainer-email', None,
                    
82         "print the maintainer's email address"),
                    
83        ('contact', None,
                    
85        ('contact-email', None,
                    
86         "print the maintainer's email address if known, else the author's"),
                    
87        ('url', None,
                    
                
MailboxReader.cs https://hg01.codeplex.com/bugnet | C# | 481 lines
                    
74                            {
                    
75                                messageFrom = string.Join("; ", mailHeader.From.ToList().Select(p => p.Address).ToArray()).Trim();
                    
76                            }
                    
86                            {
                    
87                                recipients.AddRange(mailHeader.Bcc.Mailboxes.Select(mailbox => mailbox.Address));
                    
88                            }
                    
90                            // loop through the mailboxes
                    
91                            foreach (var address in recipients)
                    
92                            {
                    
138                                    // strip the <body> out of the message (using code from below)
                    
139                                    var bodyExtractor = new Regex("<body.*?>(?<content>.*)</body>", RegexOptions.IgnoreCase | RegexOptions.Singleline);
                    
140                                    var match = bodyExtractor.Match(mailbody.BodyHtmlText);
                    
141
                    
142                                    var emailContent = match.Success && match.Groups["content"] != null
                    
143                                        ? match.Groups["content"].Value
                    
                
Utility.cs https://hg01.codeplex.com/websecuritytool | C# | 677 lines
                    
126
                    
127        public static bool IsEmailAddress(String s)
                    
128        {
                    
128        {
                    
129            // Doesn't hurt to UrlDecode the string since we're looking for an email address
                    
130            s = HttpUtility.UrlDecode(s);
                    
130            s = HttpUtility.UrlDecode(s);
                    
131            return (Regex.IsMatch(s, "\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}\\b", RegexOptions.IgnoreCase));
                    
132        }
                    
137            // However it's slower than the simpler regex above.
                    
138            if (Regex.IsMatch(s, "\\b(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})\\b", RegexOptions.IgnoreCase))
                    
139            {
                    
155            // Matches a US Social Security Number provided it has dashes.
                    
156            return (Regex.IsMatch(s, "\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b", RegexOptions.IgnoreCase));
                    
157        }
                    
                
PduComposer.java git://github.com/android/platform_frameworks_base.git | Java | 1182 lines
                    
36    static private final int PDU_PHONE_NUMBER_ADDRESS_TYPE = 1;
                    
37    static private final int PDU_EMAIL_ADDRESS_TYPE = 2;
                    
38    static private final int PDU_IPV4_ADDRESS_TYPE = 3;
                    
45    static final String REGEXP_PHONE_NUMBER_ADDRESS_TYPE = "\\+?[0-9|\\.|\\-]+";
                    
46    static final String REGEXP_EMAIL_ADDRESS_TYPE = "[a-zA-Z| ]*\\<{0,1}[a-zA-Z| ]+@{1}" +
                    
47            "[a-zA-Z| ]+\\.{1}[a-zA-Z| ]+\\>{0,1}";
                    
47            "[a-zA-Z| ]+\\.{1}[a-zA-Z| ]+\\>{0,1}";
                    
48    static final String REGEXP_IPV6_ADDRESS_TYPE =
                    
49        "[a-fA-F]{4}\\:{1}[a-fA-F0-9]{4}\\:{1}[a-fA-F0-9]{4}\\:{1}" +
                    
51        "[a-fA-F0-9]{4}\\:{1}[a-fA-F0-9]{4}";
                    
52    static final String REGEXP_IPV4_ADDRESS_TYPE = "[0-9]{1,3}\\.{1}[0-9]{1,3}\\.{1}" +
                    
53            "[0-9]{1,3}\\.{1}[0-9]{1,3}";
                    
454
                    
455    private EncodedStringValue appendAddressType(EncodedStringValue address) {
                    
456        EncodedStringValue temp = null
                    
                
smarty-mode.el git://github.com/spastorino/my_emacs_for_rails.git | Emacs Lisp | 2745 lines
                    
38(eval-when-compile
                    
39  (require 'regexp-opt))
                    
40(when smarty-is-xemacs
                    
107  <filename>    : replaced by the name of the buffer
                    
108  <author>      : replaced by the user name and email address
                    
109                  \(`user-full-name',`mail-host-address', `user-mail-address')
                    
343      ["nl2br" smarty-template-nl2br t]
                    
344      ["regex_replace" smarty-template-regex-replace t]
                    
345      ["replace" smarty-template-replace t]
                    
                
test_x509name.rb git://github.com/ruby/ruby.git | Ruby | 469 lines
                    
69      ["CN", "GOTOU Yuuzou"],
                    
70      ["emailAddress", "gotoyuzo@ruby-lang.org"],
                    
71      ["serialNumber", "123"],
                    
78    assert_equal("CN", ary[2][0])
                    
79    assert_equal("emailAddress", ary[3][0])
                    
80    assert_equal("serialNumber", ary[4][0])
                    
182        ["CN", "GOTOU Yuuzou"],
                    
183        ["emailAddress", "gotoyuzo@ruby-lang.org"],
                    
184      ],
                    
185      scanner.call(
                    
186        "emailAddress=gotoyuzo@ruby-lang.org,CN=GOTOU Yuuzou,"+
                    
187        "DC=ruby-lang,DC=org")
                    
213      scanner.call(
                    
214        "emailAddress=gotoyuzo@ruby-lang.org," +
                    
215        "1.2.840.113549.1.9.1=gotoyuzo@ruby-lang.org," +
                    
                
Markdown.cs git://github.com/ServiceStack/ServiceStack.git | C# | 1775 lines
                    
116        /// <summary>
                    
117        /// when false, email addresses will never be auto-linked  
                    
118        /// WARNING: this is a significant deviation from the markdown spec
                    
155        ///     Markdown.EmptyElementSuffix (">" or " />" without the quotes)
                    
156        ///     Markdown.LinkEmails (true/false)
                    
157        ///     Markdown.AutoNewLines (true/false)
                    
201            _encodeProblemUrlCharacters = options.EncodeProblemUrlCharacters;
                    
202            _linkEmails = options.LinkEmails;
                    
203            _strictBoldItalic = options.StrictBoldItalic;
                    
217        /// <summary>
                    
218        /// when false, email addresses will never be auto-linked  
                    
219        /// WARNING: this is a significant deviation from the markdown spec
                    
333
                    
334            _backslashEscapes = new Regex(backslashPattern.Substring(0, backslashPattern.Length - 1), RegexOptions.Compiled);
                    
335        }
                    
                
PageValidate.cs https://hg01.codeplex.com/dotnetcommon1 | C# | 0 lines
                    
16        private static Regex RegPhone = new Regex("^[0-9]+[-]?[0-9]+[-]?[0-9]$");
                    
17        private static Regex RegNumber = new Regex("^[0-9]+$");
                    
18        private static Regex RegNumberSign = new Regex("^[+-]?[0-9]+$");
                    
18        private static Regex RegNumberSign = new Regex("^[+-]?[0-9]+$");
                    
19        private static Regex RegDecimal = new Regex("^[0-9]+[.]?[0-9]+$");
                    
20        private static Regex RegDecimalSign = new Regex("^[+-]?[0-9]+[.]?[0-9]+$"); //等价于^[+-]?\d+[.]?\d+$
                    
20        private static Regex RegDecimalSign = new Regex("^[+-]?[0-9]+[.]?[0-9]+$"); //等价于^[+-]?\d+[.]?\d+$
                    
21        private static Regex RegEmail = new Regex("^[\\w-]+@[\\w-]+\\.(com|net|cn|org|edu|mil|tv|biz|info)$");//w 英文字母或数字的字符串,和 [a-zA-Z0-9] 语法一样 
                    
22        private static Regex RegCHZN = new Regex("[\u4e00-\u9fa5]");
                    
134        {
                    
135            Match m = RegEmail.Match(inputData);
                    
136            return m.Success;
                    
430            {
                    
431                Regex RegNumber = new Regex(string.Format("^([{0}])+$", charInput));
                    
432                //Regex RegNumber = new Regex(string.Format("^([{0}]{{1}})+$", charInput,lenI
                    
                
parseWp.py http://ihere-blog.googlecode.com/svn/trunk/ihere_ap_1.0beta6/ | Python | 332 lines
                    
2#http://www.eriksmartt.com/blog/archives/306
                    
3#In Part 1 of this series, I described some of the motivation, and the components being used to build a new blog for myself. In this (lengthy) post, Iâ&#x20AC;&#x2122;ll address the solution I used to move my content archives from WordPress to the new app.
                    
4#encoding=UTF-8
                    
34                                    content=com.findtext(self.wpns+'comment_content'),
                    
35                                    email=com.findtext(self.wpns+'comment_author_email'),
                    
36                                    weburl=com.findtext(self.wpns+'comment_author_url'),
                    
63    def get_slug(self,linkstr):
                    
64        #        regex=ur'^.*/(.*)$'
                    
65        #        match = re.search(regex, subject)
                    
205                                  author =users.get_current_user(),
                    
206                                  authorEmail =users.get_current_user().email(),
                    
207                                  slug =item['slug'],
                    
265#                                author = users.User(comment_dict['email']),
                    
266                                authorEmail = comment_dict['email'] or 'none@dumy.com',
                    
267                                authorWebsite = comment_dict['weburl'],
                    
                
Strings.cs git://github.com/subsonic/SubSonic-2.0.git | C# | 758 lines
                    
196            const string pattern = @"<(.|\n)*?>";
                    
197            string sOut = Regex.Replace(htmlString, pattern, htmlPlaceHolder);
                    
198            sOut = sOut.Replace("&nbsp;", String.Empty);
                    
205        [Obsolete("Will be removed in future versions. Use Validation.IsEmail instead")]
                    
206        public static bool IsValidEmail(string emailAddressString)
                    
207        {
                    
207        {
                    
208            return Validation.IsEmail(emailAddressString);
                    
209        }
                    
323                    if(!String.IsNullOrEmpty(sourceString))
                    
324                        sourceString = Regex.Replace(sourceString, replace[i], String.Empty);
                    
325                }
                    
                
Validation.cs git://github.com/subsonic/SubSonic-2.0.git | C# | 488 lines
                    
78        /// </summary>
                    
79        /// <param name="emailAddressString">The email address string.</param>
                    
80        /// <returns>
                    
82        /// </returns>
                    
83        public static bool IsEmail(string emailAddressString)
                    
84        {
                    
84        {
                    
85            return Regex.IsMatch(emailAddressString, RegexPattern.EMAIL);
                    
86        }
                    
180        {
                    
181            return Regex.IsMatch(ipAddress, RegexPattern.IP_ADDRESS);
                    
182        }
                    
264                       Regex.IsMatch(creditCard, RegexPattern.CREDIT_CARD_DINERS_CLUB) ||
                    
265                       Regex.IsMatch(creditCard, RegexPattern.CREDIT_CARD_DISCOVER) ||
                    
266                       Regex.IsMatch(creditCard, RegexPattern.CREDIT_CARD_EN_ROUTE) ||
                    
                
git.el git://github.com/gregnewman/20seven-emacs.git | Emacs Lisp | 1588 lines
                    
69(defcustom git-committer-email nil
                    
70  "Email address to use for commits.
                    
71The default is to fall back to the git repository config,
                    
71The default is to fall back to the git repository config,
                    
72then to `add-log-mailing-address' and then to `user-mail-address'."
                    
73  :group 'git
                    
275(defun git-get-committer-email ()
                    
276  "Return the email address to use as GIT_COMMITTER_EMAIL."
                    
277  ; copied from log-edit
                    
279      (git-config "user.email")
                    
280      (and (boundp 'add-log-mailing-address) add-log-mailing-address)
                    
281      (and (fboundp 'user-mail-address) (user-mail-address))
                    
281      (and (fboundp 'user-mail-address) (user-mail-address))
                    
282      (and (boundp 'user-mail-address) user-mail-address)))
                    
283
                    
                
admin_user_search.php http://torrentpier2.googlecode.com/svn/trunk/ | PHP | 1296 lines
                    
188			$username = ( isset($_GET['username']) ) ? $_GET['username'] : $_POST['username'];
                    
189			$regex = ( @$_POST['search_username_regex'] ) ? true : ( @$_GET['regex'] ) ? true : false;
                    
190
                    
198			$email = ( isset($_GET['email']) ) ? $_GET['email'] : $_POST['email'];
                    
199			$regex = ( @$_POST['search_email_regex'] ) ? true : ( @$_GET['regex'] ) ? true : false;
                    
200
                    
207		case 'search_ip':
                    
208			$ip_address = ( isset($_POST['ip_address'] ) ) ? $_POST['ip_address'] : $_GET['ip_address'];
                    
209
                    
251			$userfield_value = ( isset($_POST['userfield_value'] ) ) ? $_POST['userfield_value'] : $_GET['userfield_value'];
                    
252			$regex = ( @$_POST['search_userfield_regex'] ) ? true : ( @$_GET['regex'] ) ? true : false;
                    
253
                    
396		case 'search_email':
                    
397			$base_url .= '&search_email=true&email='.rawurlencode(stripslashes($email));
                    
398
                    
                
validations.cfm git://github.com/Fusegrid/fusegrid-sdk.git | ColdFusion | 645 lines
                    
4
                    
5<cffunction name="validatesConfirmationOf" returntype="void" access="public" output="false" hint="Validates that the value of the specified property also has an identical confirmation value. (This is common when having a user type in their email address a second time to confirm, confirming a password by typing it a second time, etc.) The confirmation value only exists temporarily and never gets saved to the database. By convention, the confirmation property has to be named the same as the property with ""Confirmation"" appended at the end. Using the password example, to confirm our `password` property, we would create a property called `passwordConfirmation`."
                    
6	examples=
                    
49
                    
50<cffunction name="validatesFormatOf" returntype="void" access="public" output="false" hint="Validates that the value of the specified property is formatted correctly by matching it against a regular expression using the `regEx` argument and/or against a built-in CFML validation type using the `type` argument (`creditcard`, `date`, `email`, etc.)."
                    
51	examples=
                    
56		<!--- Make sure that the user has entered an email address ending with the `.se` domain when the `ipCheck()` method returns `true`, and it''s not Sunday. Also supply a custom error message that overrides the Wheels default one --->
                    
57		<cfset validatesFormatOf(property="email", regEx="^.*@.*\.se$", condition="ipCheck()", unless="DayOfWeek() IS 1", message="Sorry, you must have a Swedish email address to use this website.")>
                    
58	'
                    
60	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
                    
61	<cfargument name="regEx" type="string" required="false" default="" hint="Regular expression to verify against.">
                    
62	<cfargument name="type" type="string" required="false" default="" hint="One of the following types to verify against: `creditcard`, `date`, `email`, `eurodate`, `guid`, `social_security_number`, `ssn`, `telephone`, `time`, `URL`, `USdate`, `UUID`, `variableName`, `zipcode` (will be passed through to your CFML engine's `IsValid()` function).">
                    
75		{
                    
76			if (Len(arguments.type) && !ListFindNoCase("creditcard,date,email,eurodate,guid,social_security_number,ssn,telephone,time,URL,USdate,UUID,variableName,zipcode", arguments.type))
                    
77				$throw(type="Wheels.IncorrectArguments", message="The `#arguments.type#` type is not supported.", extendedInfo="Use one of the supported types: `creditcard`, `date`, `email`, `eurodate`, `guid`, `social_security_number`, `ssn`, `telephone`, `time`, `URL`, `USdate`, `UUID`, `variableName`, `zipcode`");
                    
                
fck_link.js http://fckeditor-for-wordpress.googlecode.com/svn/trunk/ | JavaScript | 665 lines
                    
80	var oEMailInfo = new Object() ;
                    
81	oEMailInfo.Address	= '' ;
                    
82	oEMailInfo.Subject	= '' ;
                    
249			var oEMailInfo = oParser.ParseEMailUrl( sUrl ) ;
                    
250			GetE('txtEMailAddress').value	= oEMailInfo.Address ;
                    
251			GetE('txtEMailSubject').value	= oEMailInfo.Subject ;
                    
326	ShowE('divLinkTypeAnchor'	, (linkType == 'anchor') ) ;
                    
327	ShowE('divLinkTypeEMail'	, (linkType == 'email') ) ;
                    
328
                    
473		case 'email' :
                    
474			sUri = GetE('txtEMailAddress').value ;
                    
475
                    
523			case 'url':
                    
524				var oLinkPathRegEx = new RegExp("//?([^?\"']+)([?].*)?$") ;
                    
525				var asLinkPath = oLinkPathRegEx.exec( sUri ) ;
                    
                
validators.py https://code.google.com/p/web2py/ | Python | 3845 lines
                    
26
                    
27regex_isint = re.compile('^[+-]?\d+$')
                    
28
                    
47    'IS_DECIMAL_IN_RANGE',
                    
48    'IS_EMAIL',
                    
49    'IS_LIST_OF_EMAILS',
                    
58    'IS_IPV6',
                    
59    'IS_IPADDRESS',
                    
60    'IS_LENGTH',
                    
194                expression = expression.decode('utf8')
                    
195            self.regex = re.compile(expression,re.UNICODE)
                    
196        else:
                    
196        else:
                    
197            self.regex = re.compile(expression)
                    
198        self.error_message = error_message
                    
                
Akun.java http://siorpertama.googlecode.com/svn/trunk/ | Java | 216 lines
                    
29    @NamedQuery(name = "Akun.findByPassword", query = "SELECT a FROM Akun a WHERE a.password = :password"),
                    
30    @NamedQuery(name = "Akun.findByEmail", query = "SELECT a FROM Akun a WHERE a.email = :email"),
                    
31    @NamedQuery(name = "Akun.findByNamaakun", query = "SELECT a FROM Akun a WHERE a.namaakun = :namaakun"),
                    
50    private String password;
                    
51    // @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
                    
52    @Basic(optional = false)
                    
54    @Size(min = 1, max = 30)
                    
55    @Column(name = "email")
                    
56    private String email;
                    
99        this.password = password;
                    
100        this.email = email;
                    
101        this.namaakun = namaakun;
                    
129
                    
130    public void setEmail(String email) {
                    
131        this.email = email;
                    
                
fr git://github.com/webmin/webmin.git | Forth | 594 lines
                    
1acl_all=Tous
                    
2acl_arp=Client ethernet addresses
                    
3acl_asnum=AS Numbers
                    
3acl_asnum=AS Numbers
                    
4acl_bregexp=Browser Regexp
                    
5acl_buttdel=Supprimer
                    
30acl_pusers=Utilisateurs Proxy
                    
31acl_regexp=Expressions rationnelles
                    
32acl_reqmethods=Methodes de la demande
                    
147eadm_cap=Cache announce port
                    
148eadm_cmemail=Adresse email de l'administrateur de la m&#233;moire cache
                    
149eadm_default=D&#233;faut
                    
351emisc_return=squid index
                    
352emisc_sdta=Startup DNS test addresses
                    
353emisc_slr=SIGUSR1 logfile rotations
                    
                
Html2Text.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 487 lines
                    
37 *  Thanks to Alexander Krug (http://www.krugar.de/) to pointing out and
                    
38 *  correcting an error in the regexp search array. Fixed 7/30/03.
                    
39 *
                    
54 *  Thanks to Mathieu Collas (http://www.myefarm.com/) for finding a
                    
55 *  display/formatting bug in the _build_link_list() function: email
                    
56 *  readers would show the left bracket and number ("[1") as part of the
                    
56 *  readers would show the left bracket and number ("[1") as part of the
                    
57 *  rendered email address.
                    
58 *  Updated 12/16/04.
                    
88 *  Thanks to Jeffrey Silverman (http://www.newtnotes.com/) for pointing
                    
89 *  out that extra spaces should be compressed--a problem addressed with
                    
90 *  Marcus Bointon's fixes but that I had not yet incorporated.
                    
267    /**
                    
268     *  Contains URL addresses from links to be rendered in plain text.
                    
269     *
                    
                
install.php git://github.com/ushahidi/Ushahidi_Web.git | PHP | 969 lines
                    
172		/* Email error checking */
                    
173		if(!$site_email || strlen($site_email = trim($site_email)) == 0){
                    
174			$form->set_error("site_email", "Please enter a <strong>site email address</strong>.");
                    
180			if(!preg_match($regex,$site_email)){
                    
181				$form->set_error("site_email", "Please enter a valid email address. ex: johndoe@email.com.");
                    
182			}
                    
182			}
                    
183			$site_email = stripslashes($site_email);
                    
184		}
                    
228		//check for empty fields
                    
229		if(!$alert_email || strlen($alert_email = trim($alert_email)) == 0 ){
                    
230			$form->set_error("site_alert_email", "Please make sure to " .
                    
230			$form->set_error("site_alert_email", "Please make sure to " .
                    
231					"enter a <strong>site alert email address</strong>.");
                    
232		}
                    
                
ConectorImpl.java https://code.google.com/p/fullmetalgalaxy/ | Java | 1003 lines
                    
40import java.util.logging.Logger;
                    
41import java.util.regex.Matcher;
                    
42import java.util.regex.Pattern;
                    
89  private static final String FIELD_USERNAME = "username_edit";
                    
90  private static final String FIELD_EMAIL = "email";
                    
91  private static final String FIELD_LEVEL = "profile_field_10_2";
                    
98  private static final Pattern s_usernamePattern = fieldTextPattern( FIELD_USERNAME );
                    
99  private static final Pattern s_emailPattern = fieldTextPattern( FIELD_EMAIL );
                    
100  private static final Pattern s_jabberPattern = fieldTextPattern( FIELD_JABBER );
                    
104  private static final Pattern s_notifQtyPattern = fieldSelectPattern( FIELD_FMG_NOTIF_QTY );
                    
105  private static final Pattern s_sendEmailPattern = fieldRadioPattern( "viewemail" );
                    
106
                    
110  {
                    
111    s_fieldPatternMap.put( "viewemail", fieldRadioPattern( "viewemail" ) );
                    
112    s_fieldPatternMap.put( "newsletter", fieldRadioPattern( "newsletter" ) );
                    
                
psi_ops.py https://bitbucket.org/psiphon/psiphon-circumvention-system/ | Python | 1706 lines
                    
144    'Server',
                    
145    'id, host_id, ip_address, egress_ip_address, '+
                    
146    'propagation_channel_id, is_embedded, discovery_date_range, '+
                    
207            'twitter' : PropagationMechanism('twitter'),
                    
208            'email-autoresponder' : PropagationMechanism('email-autoresponder'),
                    
209            'static-download' : PropagationMechanism('static-download')
                    
282                len(self.__servers),
                    
283                self.__email_server_account.ip_address if self.__email_server_account else 'None',
                    
284                self.__stats_server_account.ip_address if self.__stats_server_account else 'None',
                    
320                                                         for region, home_pages in sorted(s.home_pages.items())]),
                    
321                    'page_view_regexes': '\n                         '.join(['%s -> %s' % (page_view_regex.regex, page_view_regex.replace)
                    
322                                                                             for page_view_regex in s.page_view_regexes]),
                    
322                                                                             for page_view_regex in s.page_view_regexes]),
                    
323                    'https_request_regexes': '\n                         '.join(['%s -> %s' % (https_request_regex.regex, https_request_regex.replace)
                    
324                                                                                 for https_request_regex in s.https_request_regexes]),
                    
                
validations.cfm git://github.com/raulriera/SplashCMS.git | ColdFusion | 483 lines
                    
4
                    
5<cffunction name="validatesConfirmationOf" returntype="void" access="public" output="false" hint="Validates that the value of the specified property also has an identical confirmation value (common when having a user type in their email address, choosing a password etc). The confirmation value only exists temporarily and never gets saved to the database. By convention the confirmation property has to be named the same as the property with ""Confirmation"" appended at the end. Using the password example, to confirm our `password` property we would create a property called `passwordConfirmation`."
                    
6	examples=
                    
39
                    
40<cffunction name="validatesFormatOf" returntype="void" access="public" output="false" hint="Validates that the value of the specified property is formatted correctly by matching it against a regular expression using the `regEx` argument and/or against a built-in CFML validation type (`creditcard`, `date`, `email` etc) using the `type` argument."
                    
41	examples=
                    
46		<!--- Make sure that the user has entered an email address ending with the `.se` domain when the `ipCheck` methods returns `true` and it''s not Sunday, also supply a custom error message that overrides the Wheels default one --->
                    
47		<cfset validatesFormatOf(property="email", regEx="^.*@.*\.se$", if="ipCheck()", unless="DayOfWeek() IS 1" message="Sorry, you must have a Swedish email address to use this website")>
                    
48	'
                    
50	<cfargument name="properties" type="string" required="false" default="" hint="See documentation for @validatesConfirmationOf.">
                    
51	<cfargument name="regEx" type="string" required="false" default="" hint="Regular expression to verify against.">
                    
52	<cfargument name="type" type="string" required="false" default="" hint="One of the following types to verify against: `creditcard`, `date`, `email`, `eurodate`, `guid`, `social_security_number`, `ssn`, `telephone`, `time`, `URL`, `USdate`, `UUID`, `variableName`, `zipcode` (will be passed through to CFML's `isValid` function).">
                    
134	'
                    
135		<!--- Make sure that the user data can not be saved to the database without the `emailAddress` property (it has to exist and not be an empty string) --->
                    
136		<cfset validatesPresenceOf("emailAddress")>
                    
                
mstats.vehicle-list.js https://hg01.codeplex.com/atha | JavaScript | 529 lines
                    
11// The example companies, organizations, products, domain names,
                    
12// e-mail addresses, logos, people, places, and events depicted
                    
13// herein are fictitious.  No association with any real company,
                    
13// herein are fictitious.  No association with any real company,
                    
14// organization, product, domain name, email address, logo, person,
                    
15// places, or events is intended or should be inferred.
                    
16//===================================================================================
                    
17/*jslint onevar: true, undef: true, newcap: true, regexp: true, 
                    
18plusplus: true, bitwise: true, devel: true, maxerr: 50 */
                    
                
mstats.charts.js https://hg01.codeplex.com/atha | JavaScript | 576 lines
                    
11// The example companies, organizations, products, domain names,
                    
12// e-mail addresses, logos, people, places, and events depicted
                    
13// herein are fictitious.  No association with any real company,
                    
13// herein are fictitious.  No association with any real company,
                    
14// organization, product, domain name, email address, logo, person,
                    
15// places, or events is intended or should be inferred.
                    
16//===================================================================================
                    
17/*jslint onevar: true, undef: true, newcap: true, regexp: true, plusplus: true, bitwise: true, devel: true, maxerr: 50 */
                    
18/*global jQuery:false */
                    
                
test_smtplib.py https://bitbucket.org/mirror/cpython/ | Python | 1291 lines
                    
3import email.mime.text
                    
4from email.message import EmailMessage
                    
5from email.base64mime import body_encode as encode_base64
                    
80
                    
81    def testSourceAddress(self):
                    
82        mock_socket.reply_with(b"220 Hola mundo")
                    
242
                    
243    def testSourceAddress(self):
                    
244        # connect
                    
247            smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost',
                    
248                    timeout=3, source_address=('127.0.0.1', port))
                    
249            self.assertEqual(smtp.source_address, ('127.0.0.1', port))
                    
420        # Make sure nothing breaks if not all of the three 'to' headers exist
                    
421        m = email.mime.text.MIMEText('A test message')
                    
422        m['From'] = 'foo@bar.com'
                    
                
dist.py https://bitbucket.org/mirror/cpython/ | Python | 1237 lines
                    
9import re
                    
10from email import message_from_file
                    
11
                    
22
                    
23# Regex to define acceptable Distutils command names.  This is not *quite*
                    
24# the same as a Python NAME -- I don't allow leading underscores.  The fact
                    
82        ('author-email', None,
                    
83         "print the author's email address"),
                    
84        ('maintainer', None,
                    
86        ('maintainer-email', None,
                    
87         "print the maintainer's email address"),
                    
88        ('contact', None,
                    
90        ('contact-email', None,
                    
91         "print the maintainer's email address if known, else the author's"),
                    
92        ('url', None,
                    
                
mlogc.c http://vulture.googlecode.com/svn/trunk/ | C | 0 lines
                    
11* other questions related to licensing please contact Trustwave Holdings, Inc.
                    
12* directly using the email address security@modsecurity.org.
                    
13*/
                    
87
                    
88/* -- Regex Patterns -- */
                    
89
                    
149static const char            *log_repository = NULL;
                    
150static void                  *logline_regex = NULL;
                    
151static int                    max_connections = 10;
                    
160/* static apr_time_t             queue_time = 0; */
                    
161static void                  *requestline_regex = NULL;
                    
162static int                    running = 0;
                    
                
apache2_config.c http://vulture.googlecode.com/svn/trunk/ | C | 0 lines
                    
11* other questions related to licensing please contact Trustwave Holdings, Inc.
                    
12* directly using the email address security@modsecurity.org.
                    
13*/
                    
78    dcfg->auditlog_parts = NOT_SET_P;
                    
79    dcfg->auditlog_relevant_regex = NOT_SET_P;
                    
80
                    
166
                    
167                            int rc = msc_regexec(exceptions[j]->param_data,
                    
168                                    rule->actionset->msg, strlen(rule->actionset->msg),
                    
186
                    
187                                    int rc = msc_regexec(exceptions[j]->param_data,
                    
188                                            action->param, strlen(action->param),
                    
                
modsecurity.h http://vulture.googlecode.com/svn/trunk/ | C Header | 0 lines
                    
11* other questions related to licensing please contact Trustwave Holdings, Inc.
                    
12* directly using the email address security@modsecurity.org.
                    
13*/
                    
180
                    
181#define REGEX_CAPTURE_BUFLEN            1024
                    
182
                    
                
re_operators.c http://vulture.googlecode.com/svn/trunk/ | C | 0 lines
                    
11* other questions related to licensing please contact Trustwave Holdings, Inc.
                    
12* directly using the email address security@modsecurity.org.
                    
13*/
                    
313                (ignore_case ? AP_REG_ICASE : 0));
                    
314        rule->sub_regex = regex;
                    
315    } else {
                    
417
                    
418    for (offset = data; !ap_regexec(rule->sub_regex,  offset, 1, pmatch, 0); ) {
                    
419        p_len = pmatch [0].rm_eo - pmatch [0].rm_so;
                    
483    int erroffset;
                    
484    msc_regex_t *regex;
                    
485    const char *pattern = rule->op_param;
                    
503static int msre_op_rx_execute(modsec_rec *msr, msre_rule *rule, msre_var *var, char **error_msg) {
                    
504    msc_regex_t *regex = (msc_regex_t *)rule->op_param_data;
                    
505    const char *target;
                    
                
fck_link.js http://uniquestudiocms.googlecode.com/svn/trunk/ | JavaScript | 894 lines
                    
204				var oEMailParams = oParser.ParseEMailParams( aMatch[2] ) ;
                    
205				oEMailInfo.Subject = oEMailParams.Subject ;
                    
206				oEMailInfo.Body = oEMailParams.Body ;
                    
213
                    
214oParser.CreateEMailUri = function( address, subject, body )
                    
215{
                    
224				{
                    
225					alert('EMailProtection alert!\nNo function defined. Please set "FCKConfig.EMailProtectionFunction"') ;
                    
226				}
                    
417	// Search for a protected email link.
                    
418	var oEMailInfo = oParser.ParseEMailUri( sHRef );
                    
419
                    
423
                    
424		GetE('txtEMailAddress').value = oEMailInfo.Address ;
                    
425		GetE('txtEMailSubject').value = oEMailInfo.Subject ;
                    
                
email_maintainers.py http://hadesmem.googlecode.com/svn/trunk/ | Python | 0 lines
                    
134        self.name = name
                    
135        self.email = email
                    
136        self.libraries = list()
                    
410        lib_maintainer_regex = re.compile('(\S+)\s*(.*)')
                    
411        name_email_regex = re.compile('\s*(\w*(\s*\w+)+)\s*<\s*(\S*(\s*\S+)+)\S*>')
                    
412        at_regex = re.compile('\s*-\s*at\s*-\s*')
                    
425                            email = nmm.group(3)
                    
426                            email = at_regex.sub('@', email)
                    
427                            maintainer = self.getMaintainer(name, email)
                    
446        platform_maintainer_regex = re.compile('([A-Za-z0-9_.-]*|"[^"]*")\s+(\S+)\s+(.*)')
                    
447        name_email_regex = re.compile('\s*(\w*(\s*\w+)+)\s*<\s*(\S*(\s*\S+)+)\S*>')
                    
448        at_regex = re.compile('\s*-\s*at\s*-\s*')
                    
457                    for person in re.split('\s*,\s*', m.group(3)):
                    
458                        nmm = name_email_regex.match(person)
                    
459                        if nmm:
                    
                
history.html http://hadesmem.googlecode.com/svn/trunk/ | HTML | 0 lines
                    
6<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
                    
7<link rel="home" href="../../index.html" title="Boost.Regex">
                    
8<link rel="up" href="../background_information.html" title="Background Information">
                    
29        New issues should be submitted at <a href="http://svn.boost.org" target="_top">svn.boost.org</a>
                    
30        - don't forget to include your email address in the ticket!
                    
31      </p>
                    
137<a name="id1153341"></a>
                    
138        <a class="link" href="history.html#boost_regex.background_information.history.boost_1_34">Boost
                    
139        1.34</a>
                    
278            types used previously - bad_expression and bad_pattern - are now just
                    
279            typedefs for regex_error. Type regex_error has a couple of new members:
                    
280            code() to report an error code rather than a string, and position() to
                    
293<a name="id1153647"></a>
                    
294        <a class="link" href="history.html#boost_regex.background_information.history.boost_1_31_0">Boost
                    
295        1.31.0</a>
                    
                
sb-rmail.el git://github.com/spastorino/my_emacs_for_rails.git | Emacs Lisp | 157 lines
                    
22;; You should have received a copy of the GNU General Public License
                    
23;; along with this program; if not, you can either send email to this
                    
24;; program's author (see below) or write to:
                    
36;; files are displayed.  These functions provide rmail specific support,
                    
37;; showing links and addresses in the side-bar.
                    
38;;
                    
50;;; Code:
                    
51(defvar rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$"
                    
52  "*This regex is used to match folder names to be displayed in speedbar.
                    
88  "Create buttons for BUFFER containing rmail messages.
                    
89Click on the address under Reply to: to reply to this person.
                    
90Under Folders: Click a name to read it, or on the <M> to move the
                    
117						  default-directory)
                    
118				  nil rmail-speedbar-match-folder-regexp)))
                    
119	(while df
                    
                
meetup_group_modify.js http://meetup001.googlecode.com/svn/trunk/ | JavaScript | 270 lines
                    
76					//bValid = bValid && checkRegexp(name,/^[a-z]([0-9a-z_])+$/i,"Username may consist of a-z, 0-9, underscores, begin with a letter.");
                    
77					// From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
                    
78					//bValid = bValid && checkRegexp(email,/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,"eg. ui@jquery.com");
                    
78					//bValid = bValid && checkRegexp(email,/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,"eg. ui@jquery.com");
                    
79					//bValid = bValid && checkRegexp(password,/^([0-9a-zA-Z])+$/,"Password field only allow : a-z 0-9");
                    
80					
                    
175
                    
176function checkRegexp(o,regexp,n) {
                    
177
                    
177
                    
178	if ( !( regexp.test( o.val() ) ) ) {
                    
179		o.addClass('ui-state-error');
                    
                
micrite-base-lang-en.js http://micrite.googlecode.com/svn/trunk/ | JavaScript | 335 lines
                    
136    blankText     : "This field is required",
                    
137    regexText     : "",
                    
138    emptyText     : null
                    
172  Ext.apply(Ext.form.VTypes, {
                    
173    emailText    : 'This field should be an e-mail address in the format "user@domain.com"',
                    
174    urlText      : 'This field should be a URL in the format "http:/'+'/www.domain.com"',
                    
                
gnus-mlspl.el git://github.com/typester/emacs.git | Emacs Lisp | 231 lines
                    
132nnml:mail.bar:
                    
133\((to-address . \"bar@femail.com\")
                    
134 (split-regexp . \".*@femail\\\\.com\"))
                    
176	      ;; Let's deduce split-spec from other params
                    
177	      (let ((to-address (cdr (assoc 'to-address params)))
                    
178		    (to-list (cdr (assoc 'to-list params)))
                    
179		    (extra-aliases (cdr (assoc 'extra-aliases params)))
                    
180		    (split-regexp (cdr (assoc 'split-regexp params)))
                    
181		    (split-exclude (cdr (assoc 'split-exclude params))))
                    
190			  (append
                    
191			   (and to-address (list (regexp-quote to-address)))
                    
192			   (and to-list (list (regexp-quote to-list)))
                    
196				  (list extra-aliases)))
                    
197			   (and split-regexp (list split-regexp)))
                    
198			  "\\|")
                    
                
meme.pm git://github.com/bioperl/bioperl-live.git | Perl | 237 lines
                    
52reponsive experts will be able look at the problem and quickly 
                    
53address it. Please include a thorough description of the problem 
                    
54with code and data examples if at all possible.
                    
66 Bbased on the Bio::SeqIO modules by Ewan Birney and others
                    
67 Email: benb@fruitfly.berkeley.edu
                    
68
                    
139        }
                    
140        # The first regexp is for version 3, the second is for version 4
                    
141        elsif ( $line =~ /^(\S+)\s+([+-]?)\s+(\d+)\s+
                    
                
String.cc http://casacore.googlecode.com/svn/trunk/ | C++ | 578 lines
                    
18//#
                    
19//# Correspondence concerning AIPS++ should be addressed as follows:
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
21//#        Postal address: AIPS++ Project Office
                    
22//#                        National Radio Astronomy Observatory
                    
29
                    
30#include <casa/BasicSL/RegexBase.h>
                    
31#include <algorithm>
                    
314
                    
315// RegexBase related functions
                    
316String::size_type String::find(const RegexBase &r, size_type pos) const {
                    
320
                    
321String::size_type String::rfind(const RegexBase &r, size_type pos) const {
                    
322  Int unused;
                    
                
SiteMatrixI.pm git://github.com/bioperl/bioperl-live.git | Perl | 540 lines
                    
43  pos - current position get/set. Returns an integer.
                    
44  regexp - construct a regular expression based on IUPAC consensus.
                    
45      For example AGWV will be [Aa][Gg][AaTt][AaCcGg]
                    
89reponsive experts will be able look at the problem and quickly 
                    
90address it. Please include a thorough description of the problem 
                    
91with code and data examples if at all possible.
                    
319 Title   : regexp
                    
320 Usage   : my $regexp=$site->regexp;
                    
321 Function: Returns a regular expression which matches the IUPAC convention.
                    
337 Title   : regexp_array
                    
338 Usage   : my @regexp=$site->regexp;
                    
339 Function: Returns a regular expression which matches the IUPAC convention.
                    
344 Args    :
                    
345 To do   : I have separated regexp and regexp_array, but
                    
346           maybe they can be rewritten as one - just check what
                    
                
s3list.php https://code.google.com/p/s3db/ | PHP | 379 lines
                    
5function s3list($s3ql)
                    
6{$regexp = $GLOBALS['regexp'];
                    
7$dbstruct = $GLOBALS['dbstruct'];
                    
79										'username'=>'account_uname',
                    
80										'email'=>'account_email',
                    
81										'phone'=>'account_phone',
                    
235	
                    
236		$query_end = str_replace("and project_id ".$regexp." '".$user_project_list."'", "and subject = entity and object = 'UID' and s3db_rule.project_id = s3db_resource.project_id and (s3db_rule.project_id ".$regexp." '".$user_project_list."' or s3db_rule.permission ".$regexp." '".$user_permission_list."')", $query_end);
                    
237	
                    
256	
                    
257	$query_end = str_replace("and project_id ".$regexp." '".$user_project_list."'", "and resource_class_id ".$regexp." '".$classes_list."'", $query_end);
                    
258	
                    
287			
                    
288			$query_end = str_replace("and project_id ".$regexp." '".$user_project_list."'", " and (project_id ".$regexp." '".$user_project_list."' or permission ".$regexp." '".$user_permission_list."')", $query_end);
                    
289			
                    
                
tHDF5Image.cc http://casacore.googlecode.com/svn/trunk/ | C++ | 347 lines
                    
18//#
                    
19//# Correspondence concerning AIPS++ should be addressed as follows:
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
21//#        Postal address: AIPS++ Project Office
                    
22//#                        National Radio Astronomy Observatory
                    
51#include <casa/BasicSL/String.h>
                    
52#include <casa/Utilities/Regex.h>
                    
53
                    
63  String s = msg;
                    
64  s.gsub (Regex("/.*/t"), "t");
                    
65  return s;
                    
                
default.properties git://github.com/cfaddict/hyrule.git | Properties File | 45 lines
                    
3required=The field {property} must contain a value.
                    
4email=The field {property} is not a valid email address.
                    
5unique=The field {property} is not a unique value.
                    
10range=The range was not met for the field {property}.
                    
11regex=The field {property} does not follow the regular expression pattern {pattern}.
                    
12numeric=The field {property} is not a valid number.
                    
24type.date=The field {property} is not a valid date.
                    
25type.email=The field {property} is not a valid email address.
                    
26type.eurodate=The field {property} is not a valid euro date.
                    
                
forms.py https://code.google.com/p/pageforest/ | Python | 196 lines
                    
21
                    
22USERNAME_REGEX_MATCH = re.compile('^%s$' % settings.USERNAME_REGEX).match
                    
23
                    
90                "Username must end with a letter or number.")
                    
91        if not USERNAME_REGEX_MATCH(username):
                    
92            raise forms.ValidationError(
                    
104        widget=forms.PasswordInput(render_value=False), required=False)
                    
105    email = forms.EmailField(max_length=75, label="Email address")
                    
106    tos = forms.BooleanField(
                    
129                    username=username,
                    
130                    email=self.cleaned_data['email'],
                    
131                    password=self.cleaned_data['password'])
                    
141                               widget=Static)
                    
142    email = forms.EmailField(max_length=75, label="Email address",
                    
143                             widget=Static)
                    
                
mailerdaemon.py https://bitbucket.org/mirror/cpython/ | Python | 247 lines
                    
42# If a re, it should contain at least a group (?P<email>...) which
                    
43# should refer to the email address.  The re can also contain a group
                    
44# (?P<reason>...) which should refer to the reason (error message).
                    
48# location, the second re is repeated one or more times to find
                    
49# multiple email addresses.  The second re is matched (not searched)
                    
50# where the previous match ended.
                    
85# list of re's used to find reasons (error messages).
                    
86# if a string, "<>" is replaced by a copy of the email address.
                    
87# The expressions are searched for in order.  After the first match,
                    
139                    email = emails[i]
                    
140                    exp = re.compile(re.escape(email).join(regexp.split('<>')), re.MULTILINE)
                    
141                    res = exp.search(data)
                    
149                break
                    
150    for email in emails:
                    
151        errors.append(' '.join((email.strip()+': '+reason).split()))
                    
                
IsEmailAddress.cs https://hg01.codeplex.com/cul | C# | 88 lines
                    
34    /// <summary>
                    
35    /// Email address
                    
36    /// </summary>
                    
36    /// </summary>
                    
37    public class IsEmailAddress<ObjectType> : Rule<ObjectType, string>
                    
38    {
                    
45        /// <param name="ErrorMessage">Error message</param>
                    
46        public IsEmailAddress(Func<ObjectType, string> ItemToValidate, string ErrorMessage)
                    
47            : base(ItemToValidate, ErrorMessage)
                    
59                return;
                    
60            System.Text.RegularExpressions.Regex TempReg = new System.Text.RegularExpressions.Regex(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}" +
                    
61                  @"\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\" +
                    
70    /// <summary>
                    
71    /// IsEmailAddress attribute
                    
72    /// </summary>
                    
                
fields.py https://bitbucket.org/mirror/django/ | Python | 323 lines
                    
15    'DEFAULT_DATETIME_INPUT_FORMATS', 'DateTimeField',
                    
16    'RegexField', 'EmailField', 'URLField', 'BooleanField',
                    
17    'ChoiceField', 'MultipleChoiceField',
                    
173class RegexField(Field):
                    
174    def __init__(self, regex, error_message=None, required=True, widget=None, label=None):
                    
175        """
                    
181        if isinstance(regex, basestring):
                    
182            regex = re.compile(regex)
                    
183        self.regex = regex
                    
204
                    
205class EmailField(RegexField):
                    
206    def __init__(self, required=True, widget=None, label=None):
                    
206    def __init__(self, required=True, widget=None, label=None):
                    
207        RegexField.__init__(self, email_re, gettext(u'Enter a valid e-mail address.'), required, widget, label)
                    
208
                    
                
error_messages.py git://github.com/gabrielfalcao/lettuce.git | Python | 253 lines
                    
102
                    
103    def test_regexfield(self):
                    
104        e = {
                    
109        }
                    
110        f = RegexField(r'^\d+$', min_length=5, max_length=10, error_messages=e)
                    
111        self.assertFormErrors([u'REQUIRED'], f.clean, '')
                    
115
                    
116    def test_emailfield(self):
                    
117        e = {
                    
122        }
                    
123        f = EmailField(min_length=8, max_length=10, error_messages=e)
                    
124        self.assertFormErrors([u'REQUIRED'], f.clean, '')
                    
189
                    
190    def test_ipaddressfield(self):
                    
191        e = {
                    
                
mstats.pubsub.js https://hg01.codeplex.com/atha | JavaScript | 98 lines
                    
11// The example companies, organizations, products, domain names,
                    
12// e-mail addresses, logos, people, places, and events depicted
                    
13// herein are fictitious.  No association with any real company,
                    
13// herein are fictitious.  No association with any real company,
                    
14// organization, product, domain name, email address, logo, person,
                    
15// places, or events is intended or should be inferred.
                    
16//===================================================================================
                    
17/*jslint onevar: true, undef: true, newcap: true, regexp: true, plusplus: true, bitwise: true, devel: true, maxerr: 50 */
                    
18/*global jQuery, setInterval, clearInterval */
                    
                
tArrayUtil.cc http://casacore.googlecode.com/svn/trunk/ | C++ | 413 lines
                    
18//# 
                    
19//# Correspondence concerning AIPS++ should be addressed as follows:
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
20//#        Internet email: aips2-request@nrao.edu.
                    
21//#        Postal address: AIPS++ Project Office
                    
22//#                        National Radio Astronomy Observatory
                    
32#include <casa/Arrays/Vector.h>
                    
33#include <casa/Utilities/Regex.h>
                    
34#include <casa/OS/Timer.h>
                    
90
                    
91Bool testStringToVectorRegex (Bool)
                    
92{
                    
92{
                    
93    cout << "stringToVectorRegex..." << endl;
                    
94    // Test using multiple spaces and a single comma as delimiter.
                    
                
RegistrationController.groovy git://github.com/immani/mydwich.git | Groovy | 258 lines
                    
51                flow.userInstance.addToRoles(companyRole)
                    
52                flow.deliveryAddressInstance = new DeliveryAddress(flow.companyInstance.properties)
                    
53                flow.deliveryAddressInstance.name = ""
                    
72
                    
73                flow.deliveryAddressInstance = new DeliveryAddress(params + daresults)
                    
74                flow.deliveryAddressInstance.company = flow.companyInstance
                    
93            action {
                    
94                emailConfirmationService.sendConfirmation(flow.userInstance.username, "Please confirm your email address", [from:"mydwich@immani.com"])
                    
95                flow.companyInstance.addToUsers(flow.userInstance)
                    
151            action {
                    
152                emailConfirmationService.sendConfirmation(flow.userInstance.username, "Please confirm your email address", [from:"mydwich@immani.com"])
                    
153                flow.restaurantInstance.addToUsers(flow.userInstance)
                    
223                flow.userInstance.save()
                    
224                emailConfirmationService.sendConfirmation(flow.userInstance.username, "Please confirm your email address", [from:"mydwich@immani.com"],flow.userInstance.id.toString())
                    
225
                    
                
EmailParser.cs git://github.com/andrewdavey/postal.git | C# | 280 lines
                    
29        /// </summary>
                    
30        /// <param name="emailViewOutput">The email view output.</param>
                    
31        /// <param name="email">The <see cref="Email"/> used to generate the output.</param>
                    
32        /// <returns>A <see cref="MailMessage"/> containing the email headers and content.</returns>
                    
33        public MailMessage Parse(string emailViewOutput, Email email)
                    
34        {
                    
35            var message = new MailMessage();
                    
36            InitializeMailMessage(message, emailViewOutput, email);
                    
37            return message;
                    
39
                    
40        void InitializeMailMessage(MailMessage message, string emailViewOutput, Email email)
                    
41        {
                    
105
                    
106        void AssignCommonHeader<T>(Email email, string header, Action<T> assign)
                    
107            where T : class
                    
                
SimpleMatch.py https://mailman.svn.sourceforge.net/svnroot/mailman | Python | 166 lines
                    
29#
                    
30#     (start cre, end cre, address cre)
                    
31#
                    
33# the bouncing address block, end is the line just after the bouncing address
                    
34# block, and address cre is the regexp that will recognize the addresses.  It
                    
35# must have a group called `addr' which will contain exactly and only the
                    
35# must have a group called `addr' which will contain exactly and only the
                    
36# address that bounced.
                    
37PATTERNS = [
                    
42    # sz-sb.de, corridor.com, nfg.nl
                    
43    (_c('the following addresses had'),
                    
44     _c('transcript of session follows'),
                    
54    # Smail
                    
55    (_c('failed addresses follow:'),
                    
56     _c('message text follows:'),
                    
                
validation.md git://github.com/kohana/core.git | Markdown | 267 lines
                    
29[Valid::not_empty]     | Value must be a non-empty value
                    
30[Valid::regex]         | Match the value against a regular expression
                    
31[Valid::min_length]    | Minimum number of characters for value
                    
33[Valid::exact_length]  | Value must be an exact number of characters
                    
34[Valid::email]         | An email address is required
                    
35[Valid::email_domain]  | Check that the domain of the email exists
                    
36[Valid::url]           | Value must be a URL
                    
37[Valid::ip]            | Value must be an IP address
                    
38[Valid::phone]         | Value must be a phone number
                    
143        ->rule('username', 'not_empty')
                    
144        ->rule('username', 'regex', array(':value', '/^[a-z_.]++$/iD'))
                    
145        ->rule('password', 'not_empty')
                    
217                ->rule('username', 'not_empty')
                    
218                ->rule('username', 'regex', array(':value', '/^[a-z_.]++$/iD'))
                    
219                ->rule('username', array($user, 'unique_username'))
                    
                
invitation_form.class.php https://bitbucket.org/chamilo/chamilo-dev/ | PHP | 270 lines
                    
39        
                    
40        $this->add_information_message(null, null, Translation :: get('ExcelOfEmailAddresses'));
                    
41        $this->addElement('file', self :: IMPORT_FILE_NAME, Translation :: get('FileName'));
                    
41        $this->addElement('file', self :: IMPORT_FILE_NAME, Translation :: get('FileName'));
                    
42        //        $this->addElement('textarea', Invitation :: PROPERTY_EMAIL, Translation :: get('EmailAddresses'), 'cols="70" rows="8"');
                    
43        //        $this->addRule(Invitation :: PROPERTY_EMAIL, Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');
                    
165        {
                    
166            $email_condition = new EqualityCondition(User :: PROPERTY_EMAIL, $email);
                    
167            $users = UserDataManager :: get_instance()->retrieve_users($email_condition);
                    
231                    $from[Mail :: NAME] = $invitation_user_name;
                    
232                    $from[Mail :: EMAIL] = $invitation_user_email;
                    
233                    
                    
242                    $reply[Mail :: NAME] = $invitation_user_name;
                    
243                    $reply[Mail :: EMAIL] = $invitation_user_email;
                    
244                    $mail->set_reply($reply);
                    
                
jquery.validationEngine-es.js http://jqwicket.googlecode.com/svn/trunk/ | JavaScript | 83 lines
                    
5		newLang: function() {
                    
6			$.validationEngineLanguage.allRules = 	{"required":{    			// Add your regex rules here, you can take telephone as an example
                    
7					"regex":"none",
                    
19					"minCheckbox":{
                    
20						"regex":"none",
                    
21						"alertText":"* Por favor seleccione ",
                    
23					"equals":{
                    
24						"regex":"none",
                    
25						"alertText":"* Los campos con coinciden"},		
                    
30					"email":{
                    
31						// Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
                    
32						"regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/,
                    
34					"integer":{
                    
35						"regex": /^[\-\+]?\d+$/,
                    
36						"alertText":"* No es un valor entero válido"},
                    
                
edit.php git://github.com/forkcms/forkcms.git | PHP | 247 lines
                    
184			$txtName = $this->frm->getField('name');
                    
185			$txtEmail = $this->frm->getField('email');
                    
186			$ddmMethod = $this->frm->getField('method');
                    
189
                    
190			$emailAddresses = (array) explode(',', $txtEmail->getValue());
                    
191
                    
199				// check the addresses
                    
200				foreach($emailAddresses as $address)
                    
201				{
                    
203
                    
204					if(!SpoonFilter::isEmail($address))
                    
205					{
                    
229				$values['method'] = $ddmMethod->getValue();
                    
230				$values['email'] = ($ddmMethod->getValue() == 'database_email') ? serialize($emailAddresses) : null;
                    
231				$values['success_message'] = $txtSuccessMessage->getValue(true);
                    
                
validator_helper.php git://github.com/daylightstudio/FUEL-CMS.git | PHP | 849 lines
                    
63 */
                    
64function regex($var = null, $regex)
                    
65{
                    
65{
                    
66	return preg_match('#'.$regex.'#', $var);
                    
67} 
                    
96/**
                    
97 * Validate email address against standard email address form
                    
98 *
                    
99 * @access	public
                    
100 * @param	string	string containing email address
                    
101 * @return	boolean
                    
102 */
                    
103function valid_email($email)
                    
104{
                    
                
 

Source

Language