Results 1 to 1 of 1
- 07-14-2011, 01:52 PM #1Member
- Join Date
- Jul 2011
- Rep Power
Pattern problem (capturing groups)
I am trying to match strings that consist of two identical vowels. This should be a super-easy task, but somehow it doesn't work. My regular expressoin is "([aeiou])\1".
The following statement returns false:
Can anyone help? It is my first time using capturing groups so I may be doing something wrong. However, the examples I read here seem to indicate I am doing it fine?
Thanks in advance.
EDIT: Oh nevermind, I just needed to escape the backslash... "([aeiou])\\1".
Last edited by BMF; 07-14-2011 at 01:57 PM.
- By asifzbaig in forum Advanced JavaReplies: 0Last Post: 05-28-2011, 10:07 PM
- By plrca2 in forum AWT / SwingReplies: 12Last Post: 12-07-2010, 03:56 AM
- By shashanksworld in forum New To JavaReplies: 1Last Post: 04-02-2010, 03:55 AM
- By livnihai in forum New To JavaReplies: 5Last Post: 10-11-2009, 03:34 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 12-25-2007, 12:19 PM