mailr5696 - /1.3/generic_fns/selection.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on April 14, 2008 - 16:57:
Author: bugman
Date: Mon Apr 14 16:57:29 2008
New Revision: 5696

URL: http://svn.gna.org/viewcvs/relax?rev=5696&view=rev
Log:
The identifier is now bracketed by '^' and '$' in wildcard_match().


Modified:
    1.3/generic_fns/selection.py

Modified: 1.3/generic_fns/selection.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/selection.py?rev=5696&r1=5695&r2=5696&view=diff
==============================================================================
--- 1.3/generic_fns/selection.py (original)
+++ 1.3/generic_fns/selection.py Mon Apr 14 16:57:29 2008
@@ -1366,6 +1366,7 @@
     The changes include:
 
         1.  All '*' to '.*'.
+        2.  The identifier is bracketed, '^' is added to the start and '$' 
to the end.
 
 
     @param id:          The identification object.
@@ -1393,6 +1394,9 @@
         # First replace any '*' with '.*' (relax to re conversion).
         pattern = replace(pattern, '*', '.*')
 
+        # Bracket the pattern.
+        pattern = '^' + pattern + '$'
+
         # String matches.
         if search(pattern, id):
             return True




Related Messages


Powered by MHonArc, Updated Mon Apr 14 17:40:20 2008