Using Pattern and Matcher in java.util.regex.* how do i write a RE to match one or more occurance of "|-|"
posted 10 years ago
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: