>Does anybody know of java code that does this?
If you limited the name to A-Z a-z 0-9 . it would work on anything
without a tight length limit anything.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
harryajh - 02 Sep 2007 12:57 GMT
> >Does anybody know of java code that does this?
>
[quoted text clipped - 3 lines]
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com
Thanks Roedy, this seems to do the job (forgot to say file name must
end with "con")
Pattern p = Pattern.compile("([A-Z]|[a-z]|[0-9])+.con");
Arne Vajhøj - 02 Sep 2007 15:14 GMT
>>> Does anybody know of java code that does this?
>> If you limited the name to A-Z a-z 0-9 . it would work on anything
[quoted text clipped - 4 lines]
>
> Pattern p = Pattern.compile("([A-Z]|[a-z]|[0-9])+.con");
That can be abbreviated to:
Pattern p = Pattern.compile("([A-Za-z0-9])+.con");
Arne
Eric Sosman - 02 Sep 2007 15:40 GMT
>>> On Sun, 02 Sep 2007 11:15:34 GMT, "harry" <a...@abc.com> wrote,
>>> quoted or
[quoted text clipped - 11 lines]
>
> Pattern p = Pattern.compile("([A-Za-z0-9])+.con");
Better quote that . character ... Also, the ( ) can be
eliminated if the O.P. doesn't need the capturing group.

Signature
Eric Sosman
esosman@ieee-dot-org.invalid
Arne Vajhøj - 02 Sep 2007 21:49 GMT
>> > Pattern p = Pattern.compile("([A-Z]|[a-z]|[0-9])+.con");
>>
[quoted text clipped - 3 lines]
>
> Better quote that . character ...
Yes.
Arne
Stefan Ram - 02 Sep 2007 19:57 GMT
>>Does anybody know of java code that does this?
>If you limited the name to A-Z a-z 0-9 . it would work on anything
>without a tight length limit anything.
The library »ram.jar« contains code to convert any
Unicode-Text (including surrogate pairs) into a text
consisting only of uppercase letters and numbers
that can be used as a file name under most
file systems as long as it is short enough.
public final class Main
{ public static void main( final String[] args )
{
final java.lang.String text =
"¿Aren't Kafka's Schloß and Æsops oeuvres often naïve?";
final java.lang.String product =
de.dclj.ram.notation.filode.Text.sourceText( text );
java.lang.System.out.println( product ); }}
XBFZYARENXNTXGYKAFKAXNSXGYSCHLOXDFZXGANDXGXC6ZSOPSXGOEUVRESXGOFTENXGNAXEFZVEXK
The encoding used is called »Filode« and being described
on the Filode homepage
http://www.purl.org/stefan_ram/pub/filode
The ram.jar homepage:
http://www.purl.org/stefan_ram/pub/ram-jar