[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-oro-user
Subject:    RE: Escaping pipe symbols
From:       "Sharpe, Cassandra" <cassandra_sharpe () merck ! com>
Date:       2003-03-17 20:34:24
[Download RAW message or body]

Your interpretation of my question was correct.  It was just wishful
thinking on my part that you could somehow use some special character or
something to get the scenario that I was describing to work.  I figured out
as much by looking through the source code.  Thank you anyway for the
response.

-Cassandra

-----Original Message-----
From: Daniel F. Savarese [mailto:dfs@savarese.org] 
Sent: Friday, March 14, 2003 11:21 PM
To: ORO Users List
Subject: Re: Escaping pipe symbols



In message <51A237D68848D511ABD000508B6FBD2A06F6D457@uswpmx06.merck.com>,
"Shar
pe, Cassandra" writes:
> Now the text that I need to split has pipe symbols embedded within it.  For
> example that text is ... "Word A" |" Word B"| "Word| C".  Is there a way to
> escape the pipe symbol embedded within the word?  

I don't understand the question.  If you're trying to split a string based
on a delimiting pattern, you don't have to do anything special to the input
string.  If the input string you are splitting contains occurrences of the
delimiting pattern that you don't want to treat as a delimiter, then
you just have to come up with a pattern that more accurately reflects
your splitting criteria.  If the case is sufficiently complex that it
cannot be handled by a single pattern, then you can't use split and
have to write a lexer (i.e., tokenizer) and extract the tokens with
some extra code.  A while loop with a couple of pattern matching tests
will do the trick.

daniel



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


------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, contains information of \
Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, \
proprietary copyrighted and/or legally privileged, and is intended solely for the use \
of the individual or entity named on this message. If you are not the intended \
recipient, and have received this message in error, please immediately return this by \
e-mail and then delete it.

==============================================================================


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic