regular expression

Hi,

I have a regular expression which wroks fine in linux, but when I want to use it in java it doesn't work.

The regular expression is: {[0][0-9],[1-2][0-9]} in linux. I use it for "ls" command and is working.

But when I want to use it in java is not working because the { is a metacharacter but if I put \\ for { and one for }, then regular expression doesn't work because it became: \{[0][0-9],[1-2][0-9]\}

The ideea is that I need to made an AND between two regular expressions.

Can anyone give me a solution?

Thank you,

Alexandra

[585 byte] By [alexandra_stancua] at [2007-11-27 6:58:53]
# 1
Let's see your expression and how it relates to your code if possible. When you post code, don't forget to use code tags. You can find out about them [url= http://forum.java.sun.com/help.jspa?sec=formatting]here[/url].
petes1234a at 2007-7-12 18:49:25 > top of Java-index,Java Essentials,Java Programming...
# 2
Hi,You must provide us with exmples of what it should match, and what it shouldn't match.Kaj
kajbja at 2007-7-12 18:49:25 > top of Java-index,Java Essentials,Java Programming...