| Author |
Regex.. why isn't this matching?
|
Brad Walton
Ranch Hand
Joined: Feb 16, 2008
Posts: 35
|
|
Can't figure out why this isn't matching. It looks ok to me, and works fine when I test in Perl. Thanks for any help. Edit: Should have mentioned, I am trying to match on the data between \t and \n. [ March 06, 2008: Message edited by: Brad Walton ]
|
 |
Mike Simmons
Ranch Hand
Joined: Mar 05, 2008
Posts: 2778
|
|
|
Try using m.find() instead of m.matches(). Find looks for your pattern anywhere within the input string, while matches() only looks to see if it matches the entire string, from beginning to end.
|
 |
Brad Walton
Ranch Hand
Joined: Feb 16, 2008
Posts: 35
|
|
Ehh.. nevermind. Should have been m.find(), not m.matches(). I think it's time to put the keyboard away for the day. Edit: Thanks Mike, I found the problem and was typing this as you were typing I guess. [ March 06, 2008: Message edited by: Brad Walton ]
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Regex.. why isn't this matching?
|
|
|