[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Sat, 13 Aug 2005 05:53:16 -0400 -->
- <!--x-from-r13: psbjyre ng bhgcbfgfragvary.pbz (Quevfgbcure Tbjyre) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: 1123891371.12776.0.camel@localhost -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: 1123915727.13051.13.camel@localhost --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Yet another regex question -->
- <li><em>date</em>: Sat, 13 Aug 2005 05:53:16 -0400</li>
- <li><em>from</em>: cfowler at outpostsentinel.com (Christopher Fowler)</li>
- <li><em>in-reply-to</em>: <1123915727.13051.13.camel@localhost></li>
- <li><em>references</em>: <<a href="msg00130.html">[email protected]</a>> <1123891371.12776.0.camel@localhost> <<a href="msg00132.html">[email protected]</a>> <<a href="msg00133.html">[email protected]</a>> <1123915727.13051.13.camel@localhost></li>
- <li><em>subject</em>: [ale] Yet another regex question</li>
I think the problem with that is that it requires something to be before
the X. Something has to be there but no space. I'm using perl to test
the ideas.
[cfowler at shuttle ~]$ ./regex.pl '[^ ]XMI001' 'XMI001'
No
[cfowler at shuttle ~]$ cat regex.pl
#!/usr/bin/perl
die "regex.pl <regex> <test string>\n" unless $ARGV[0] and $ARGV[1];
my $regex = $ARGV[0];
if($ARGV[1] =~ m/$regex/) {
print "Yes\n";
} else {
print "No\n";
}
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00206" href="msg00206.html">[ale] Yet another regex question</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00130" href="msg00130.html">[ale] Yet another regex question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00131" href="msg00131.html">[ale] Yet another regex question</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
<li><strong><a name="00132" href="msg00132.html">[ale] Yet another regex question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00133" href="msg00133.html">[ale] Yet another regex question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
<li><strong><a name="00136" href="msg00136.html">[ale] Yet another regex question</a></strong>
<ul><li><em>From:</em> jimpop at yahoo.com (Jim Popovitch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00137.html">[ale] ThinkPad sound working</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00139.html">[ale] Yet another regex question</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00136.html">[ale] Yet another regex question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00206.html">[ale] Yet another regex question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00138"><strong>Date</strong></a></li>
<li><a href="threads.html#00138"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>