[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



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>