Regular Expressions in java

K

kkk

http://www.javaregex.com : Enables a java application or applet to
compile and use perl5 regular expressions. It also
provides tools to use the object-oriented capabilities of java to
extend these expressions simple ways. In addition, it provides a
special interface for globbing or matching file names.
 
J

Joshua Cranmer

In addition, it provides a special interface for globbing [?] or
matching file names.

What is "globbing"?

If you go into a bash shell, you can type stuff in like [234]*, which
would match all files in the current directory that start with 2, 3, or
4. Basically, you have [] (which acts the same as normal regex, although
I think only the abcdef and a-cx-z-esque forms are supported), ?, which
is equivalent to . in normal regex, and *, equivalent to .*
 
A

Arne Vajhøj

Stefan said:
|Regex r1=new Regex("\\w");

In Perl 5, one would write »\w«, not »\\w«.

(I know that this is impossible to implement
using a library in Java.)

At the source code level. In the byte code Java contains
just the single slash.

Arne
 
R

Roedy Green

http://www.javaregex.com : Enables a java application or applet to
compile and use perl5 regular expressions.

As I understand it, Java Regex was designed to look like Perl regex.

What potentially could be appealing about your package are some aux
utilities:

1. regex proofreader
2. conversion from Perl to Java and back.
3. regex debugger so you can rapidly test a regex on a number of test
cases and figure out why strings are rejected.

see http://mindprod.com/project/regexcomposer.html
http://mindprod.com/project/regexdebugger.html
http://mindprod.com/project/regexproofreader.html
http://mindprod.com/project/regexutility.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

No flying machine will ever fly from New York to Paris.
~ Orville Wright (born: 1871-08-19 died: 1948-10-30 at age: 77) 1908 We see that same conservative pessimism in those crafting today’s computers and computer tools. They are overwhelmed by the details of producing even today’s solutions. You need young, over-confident people who don’t know too much to chart the course ahead. This is especially true of global warming where the current generation has entirely given up hope of a green planet and sustainable human survival.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top