View Single Post
Old 10-05-2012, 09:39 PM   PM User | #3
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,635
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
I'm not sure I follow you here.
That above will work fine.
PHP Code:
String str "anything /SOMETHING/ done";
String queryString "/something/";
String[] str.split(" ");
for (
String s a)
{
    if (
s.matches("(?i).*" queryString ".*"))
    {
        
System.out.println(" is a match.");
    }

Will result in:
Code:
/SOMETHING/ is a match
So since the structure works, it's a problem with the pattern not matching the data.
Fou-Lu is offline   Reply With Quote