i think the last email was right about the pattern needing to be ([A-Z]-)(?![^a-z]{3})([a-z0-9A-Z]* ),<br>this one is like a double NOT, almost right?<br><br>Now I'm just curious with a pattern like this.... This pattern <br>
([A-Z]-)(?![^a-z]{3}) <br>for text: A-xyz37 # B-ab6142 # C-Wxy66 # D-qrs93<br>matches<br><span style="color: rgb(255, 0, 0);">A-</span>xyz37 # <span style="color: rgb(255, 0, 0);">B-</span>ab6142 # <span style="color: rgb(255, 0, 0);">C-</span>Wxy66 # <span style="color: rgb(255, 0, 0);">D-</span>qrs93<br>
<br>Its looking to make sure the next thing after Capital Letter dash isnt 3 lower case letters, then 'nots' it? <br>aka it really looks ahead for 3 lowercase letters, and i thought would only match A- and D-.<br>
<br>Thanks for the help btw, I wasnt sure if these were problems with program or just me understanding regexes bad :) which is most likely the case.<br>Arian<br>
<br><br><div class="gmail_quote">2008/5/21 Laurent TAUPIAC <<a href="mailto:ltaupiac@lfdj.com" target="_blank">ltaupiac@lfdj.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




  
  

<div bgcolor="#ffffff" text="#000000">
Negative lookup assertion should match to be validate.<br>
If "Wxy" not match, the positive assertion failed.<br>
<br>
If you want a Capital letter followed by a dash but not followed by 3
lower case, you should match "not 3 lower case"<div><br>
([A-Z]-)(?![^a-z]{3})([a-z0-9]* )<br>
<br>
<br></div>
Regards<br>
<br>
Arian Hojat a écrit :
<blockquote type="cite"><div><div></div><div>Hello all,<br>
  <br>
had a question/possible bug report...<br>
For the example on this webpage:<br>
  <a href="http://www.nuclearblender.com/leftovers/howto/regex/" target="_blank">http://www.nuclearblender.com/leftovers/howto/regex/</a><br>
  <br>
this pattern is presented and i tried a positive lookup assertion which
worked, but this first negative one only matched the first pattern
(global option is on btw, so not sure why wont match).<br>
Pattern: ([A-Z]-)(?![a-z]{3})([a-z0-9]* )<br>
Text to lookup: A-xyz37 # B-ab6142 # C-Wxy66 # D-qrs93<br>
  <br>
Should
match B-ab6142 and C-Wxy66 as they both (have a capital letter followed
by a dash), then (dont have 3 lower case letters), and (are following
by letters/numbers and a space)<br>
only matches first one in the program.<br>
  <br>
Thanks, let me know if it should match only one if im wrong. Running
latest version on Windows XP.<br>
Great Tool!<br>
Arian<br>
  </div></div><pre><hr size="4" width="90%">
_______________________________________________
regex-coach site list
<a href="mailto:regex-coach@common-lisp.net" target="_blank">regex-coach@common-lisp.net</a>
<a href="http://common-lisp.net/mailman/listinfo/regex-coach" target="_blank">http://common-lisp.net/mailman/listinfo/regex-coach</a></pre>
</blockquote>
<br>
<br>
<pre cols="200">-- 





---------------------------------------------------------------------
Sorry, This disclamer is auto added by my company's FW
---------------------------------------------------------------------
























</pre>
</div>
<br><br>
Si vous n'etes pas destinataires de ce message, merci d'avertir l'expediteur de l'erreur de distribution et de le detruire immediatement.<br>
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.<br>


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.<br>
<br>
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.<br>
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.<br>


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.<br>_______________________________________________<br>
regex-coach site list<br>
<a href="mailto:regex-coach@common-lisp.net" target="_blank">regex-coach@common-lisp.net</a><br>
<a href="http://common-lisp.net/mailman/listinfo/regex-coach" target="_blank">http://common-lisp.net/mailman/listinfo/regex-coach</a><br></blockquote></div><br>