All Questions
Tagged with words regular-expressions
1 question
2
votes
1
answer
23k
views
Regular Expression for words with spaces
I want to check for the following strings using regExpression:
1) Main-xxxxx-Accepted
2) Main-xxx xxx-Accepted
I used the below
String regEx = 'Main-[aA-zZ-]*-Accepted';
Pattern.matches(regEx,'...