You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-user@jakarta.apache.org by Neil Merin <me...@hks.com> on 2003/05/14 20:13:20 UTC

REGEX

I am having problems creating a simple regex pattern that would match the
string
'books' followed by a backslash '\'.

In other words 'books\' without the ticks.  This appears to be a simple
pattern but I am having problems.  I've tried to create a simpler pattern
that would match a single backslash but had no luck.

linePattern1 = lineCompiler.compile ("books\\");
String test = linePattern1.getPattern();  # line 25

# Runtime Error #
Exception in thread "main" java.lang.NullPointerException
        at ModifyRegistry.main(ModifyRegistry.java:25)

Any suggestions on creating patterns with backslashes.

Thank you,

Neil


---------------------------------------------------------------------
To unsubscribe, e-mail: oro-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: oro-user-help@jakarta.apache.org


RE: REGEX

Posted by M Habibi <mh...@copper.net>.
try "book\\\\" no quotes.

HTH,
M

-----Original Message-----
From: Neil Merin [mailto:merin@hks.com]
Sent: Wednesday, May 14, 2003 2:13 PM
To: oro-user@jakarta.apache.org
Cc: Neil Merin
Subject: REGEX


I am having problems creating a simple regex pattern that would match the
string
'books' followed by a backslash '\'.

In other words 'books\' without the ticks.  This appears to be a simple
pattern but I am having problems.  I've tried to create a simpler pattern
that would match a single backslash but had no luck.

linePattern1 = lineCompiler.compile ("books\\");
String test = linePattern1.getPattern();  # line 25

# Runtime Error #
Exception in thread "main" java.lang.NullPointerException
        at ModifyRegistry.main(ModifyRegistry.java:25)

Any suggestions on creating patterns with backslashes.

Thank you,

Neil


---------------------------------------------------------------------
To unsubscribe, e-mail: oro-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: oro-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: oro-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: oro-user-help@jakarta.apache.org