Hi everybody,
In the following examples the double-quotes are only included for clarity, I'm not actually entering them into The Regex Coach.
Here are two regexes I'm trying: ##################### "\A*7[0-9][0-9]" "^*7[0-9][0-9]" #####################
And these are lines of data I'm trying those against: ######################## " 758" " 759" " 760" ########################
Now what I'm expecting (and want) to happen is the leading blank space(s) on the left of the numbers, as well as the three digit numbers themselves, to be highlighted as a match.
What DOES happen with both regexes is that the three digit numbers are highlighted, but not the leading blank spaces.
I'm using The Regex Coach v0.9.0 I have msvcr80.dll installed. I don't have the old manifest file anymore. I'm using Windows XP Pro, version 2002, SP2.
I'm a very beginner to regexes, but I think what I'm "expecting" to happen is what should happen, but please correct me if I'm wrong.
Thanks in advance for any assistance!
dharma
____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
Dharma Wolford wrote:
Hi everybody,
In the following examples the double-quotes are only included for clarity, I'm not actually entering them into The Regex Coach.
Here are two regexes I'm trying: ##################### "\A*7[0-9][0-9]"
^^ Is that a typo?
And these are lines of data I'm trying those against: ######################## " 758" " 759" " 760" ########################
\s*[0-9]{3}
works fine here for any (or no) leading space followed by 3 digits.
Regards,
Ian
-- $_="26432841792441078041435211430434648439292039649241435237148836077240 7208";s/\s//gs;@a=$_=~m!......!g;$_=<DATA>;@b=$_=~m!......!g ;map{push(@a,$_ ); }@b;map{print chr($_/3572); }@a; __DATA__ 114304285760360772407208385776114304371488346484353628382204360772407208
Si vous n'etes pas destinataires de ce message, merci d'avertir l'expediteur de l'erreur de distribution et de le detruire immediatement. Ce message contient des informations confidentielles ou appartenant a La Francaise des Jeux. Il est etabli a l'intention exclusive de ses destinataires. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message ou des informations qu'il contient, doit etre prealablement autorisee. Tout message electronique est susceptible d'alteration et son integrite ne peut etre assuree. La Francaise des Jeux decline toute responsabilite au titre de ce message s'il a ete modifie ou falsifie.
If you are not the intended recipient of this e-mail, please notify the sender of the wrong delivery and delete it immediately from your system. This e-mail contains confidential information or information belonging to La Francaise des Jeux and is intended solely for the addressees. The unauthorised disclosure, use, dissemination or copying (either whole or partial) of this e-mail, or any information it contains, is prohibited. E-mails are susceptible to alteration and their integrity cannot be guaranteed. La Francaise des Jeux shall not be liable for this e-mail if modified or falsified.
Laurent TAUPIAC wrote:
Ian.H a écrit :
"\A*7[0-9][0-9]"
^^ Is that a typo?
I don't think so. \A is a point assertion meaning start of subject like Other kind of point assertion are \Z, \z, \G \b \B
Thanks Laurent. Although I use a fair bit of regex stuff for PHP web development, seems it's primarily the basics repeated. \b and \B get used but can't say I've ever used the others you mention or \A.
We learn something new every day =)
Apologies to the OP for any confusion brought by my response.
Regards,
Ian
On Tue, 5 Dec 2006 16:22:16 -0800 (PST), Dharma Wolford dharmawolford@yahoo.com wrote:
In the following examples the double-quotes are only included for clarity, I'm not actually entering them into The Regex Coach.
Here are two regexes I'm trying: ##################### "\A*7[0-9][0-9]" "^*7[0-9][0-9]" #####################
And these are lines of data I'm trying those against: ######################## " 758" " 759" " 760" ########################
Now what I'm expecting (and want) to happen is the leading blank space(s) on the left of the numbers, as well as the three digit numbers themselves, to be highlighted as a match.
What DOES happen with both regexes is that the three digit numbers are highlighted, but not the leading blank spaces.
From your description, I think what you actually want are regular
expressions like these:
##################### "\A *7[0-9][0-9]" "^ *7[0-9][0-9]" #####################
The fact that your regexes match at all is counter-intuitive IMHO, but it matches with what Perl does (which was one of the design goals of CL-PPCRE): \A or ^ should only match the beginning of the string, but the asterisk somehow "extends" this.
I agree that if there's a match, it should be highlighted completely, so I will try to fix this in the next release, but I'm pretty busy right now, and I don't consider this to be high priority (i.e. a severe bug).
Thanks for the report, Edi.