aspose file tools
The moose likes Beginning Java and the fly likes regex Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "regex" Watch "regex" New topic
Author

regex

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305


OUTPUT:

Match number 1
start(): 0
end(): 3
Match number 2
start(): 4
end(): 7
Match number 3
start(): 8
end(): 11

i don't understand how is it working

what i understand regx says match substring where "spacedogspace " i think there is only one match should be found at index 3.


My one regret in life is that I am not someone else.
- Woody Allen
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
Where do you think you're specifying the "space" before and after the word? Have you read the javadocs of the java.util.regex.Pattern class to learn what all the regexp options and special characters mean?
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Ulf Dittmer wrote:Where do you think you're specifying the "space" before and after the word? Have you read the javadocs of the java.util.regex.Pattern class to learn what all the regexp options and special characters mean?


Thanks, there was some confusion ,after reading i got that i thought \\b is for escape sequence backspace.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regex