Java Regexp patterns have double backslashes, how to store patterns in readable format
Posted
by core07
on Stack Overflow
See other posts from Stack Overflow
or by core07
Published on 2010-04-17T09:05:53Z
Indexed on
2010/04/17
9:13 UTC
Read the original article
Hit count: 602
Would be great to have convenient way of storing patterns with single backslash. Some workarounds: store it in the file and use NIO to read. Cons: JEE does not allow IO access. Store somehow in JNDI. Maybe new to java 5 Pattern.LITERAL
flag can help? I want to work with normal pattern string, like \d
, not \\d
.
© Stack Overflow or respective owner