L
Lee
Hi there,
I wonder if anyone can tell me how to set a boolean if I encounter a
word in a string (in upper, lower, or a combination of cases) e.g. I
want to set a boolean to true if either "hello", "HELLO", or "hElLo" is
found in "Hello there!".
So far, I have
Pattern p = Pattern.compile("HELLO");
Matcher m = p.matcher("HELLO there!");
myBoolean = m.lookingAt();
Can anyone tell me how to modify the above so that is will match true
for upper/lower case, and will return true even in the case:
" 4HELLO123"
Stumped!!!
Thanks,
Lee
I wonder if anyone can tell me how to set a boolean if I encounter a
word in a string (in upper, lower, or a combination of cases) e.g. I
want to set a boolean to true if either "hello", "HELLO", or "hElLo" is
found in "Hello there!".
So far, I have
Pattern p = Pattern.compile("HELLO");
Matcher m = p.matcher("HELLO there!");
myBoolean = m.lookingAt();
Can anyone tell me how to modify the above so that is will match true
for upper/lower case, and will return true even in the case:
" 4HELLO123"
Stumped!!!
Thanks,
Lee