This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Using Pattern and Matcher in java.util.regex.* how do i write a RE to match one or more occurance of "|-|"
Adam Nace
Ranch Hand
Joined: Jul 17, 2006
Posts: 117
posted
0
What you have to watch out for is that the | has a special meaning in a regex, so you need to escape it. Furthermore, the \ has a special meaning in java, so you have to escape it. So what you should get is this: