Mega Code Archive

 
Categories / Java / Regular Expressions
 

Meta-characters to match against certain string boundaries

Meta-Character            Matches ^                         Beginning of the line $                         End of the line \b                        A word boundary \B                        A nonword boundary \A                        The beginning of the input \G                        The end of the previous match \Z                        The end of the input before any line terminators (such as carriage-return or linefeed) \z                        The end of the input