added: #hasAnyRegexMatches:ignoringCase:
authorClaus Gittinger <cg@exept.de>
Mon, 13 Dec 2010 11:03:12 +0100
changeset 13169 cbf8fcaf8bbf
parent 13168 d03db8c8a84a
child 13170 00f54fb7ef31
added: #hasAnyRegexMatches:ignoringCase:
CharacterArray.st
--- a/CharacterArray.st	Mon Dec 13 11:01:54 2010 +0100
+++ b/CharacterArray.st	Mon Dec 13 11:03:12 2010 +0100
@@ -4100,6 +4100,24 @@
     "Created: / 13-08-2010 / 17:09:05 / sr"
 !
 
+hasAnyRegexMatches: rxString ignoringCase:aBoolean
+    "return true, if any substrings in the receiver, matches the regular expression in rxString"
+
+    aBoolean ifTrue:[
+        ^ self hasAnyRegexMatchesIgnoringCase: rxString
+    ] ifFalse:[
+        ^ self hasAnyRegexMatches: rxString
+    ].
+
+    "
+     '1234 abcd 3456 defg' hasAnyRegexMatches:'[0-9]+'   
+     'abcd 3456 defg' hasAnyRegexMatches:'[0-9]+'        
+     'abcd xxax defg' hasAnyRegexMatches:'[0-9]+'        
+    "
+
+    "Created: / 13-12-2010 / 11:03:05 / cg"
+!
+
 hasAnyRegexMatchesIgnoringCase: rxString
     "return true, if any substrings in the receiver, matches the regular expression in rxString"
 
@@ -5834,11 +5852,11 @@
 !CharacterArray class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.443 2010-12-13 10:01:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.444 2010-12-13 10:03:12 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.443 2010-12-13 10:01:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.444 2010-12-13 10:03:12 cg Exp $'
 ! !
 
 CharacterArray initialize!