View RSS Feed

Recent Blogs Posts

  1. Regular Expressions, Literal Strings and Backslashes

    by , 04-26-2012 at 06:55 PM
    In literal strings, backlash is considered as escape character. It is basically a single backlash i.e. \\. Backlash is also considered an escape character in case of regular expressions. A single backlash is matched to the regular expression \\. As a java string, regular expression would become \\\\. Four backlashes are used for matching just one single.

    Word character is being matched with regex \w. It is abbreviated as "\\w".

    Similar backlash mess up ...