CSC/ECE 517 Summer 2008/wiki1 1 mf: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Initial creation of page)
 
(Added more info for Java)
Line 1: Line 1:
= Brief summary of regular expressions in Ruby versus Java =
= Regular expressions in Ruby versus Java =


Ruby supports regular expressions as a language feature without the inclusion of any special classes or modules.  Java on the other hand does native regular expression support and it requires the use of special regular expression classes to use them.
== Brief summary ==


= Ruby's regular expressions in more depth =
Ruby supports regular expressions as a language feature without the inclusion of any special classes or modules.  Java on the other hand does native regular expression support and it requires the use of special regular expression packages to use them.


= Java's regular expressions in more depth =
== Ruby regexp support in more depth ==


== Java regexp support in more depth ==
Java has been around for a while have has never had native regexp support.  Because of this regular expression packages had to be created.  There was no comprehensive support for regexp support from Java's main contributor, Sun, until Java 4.  Because of this there are multiple 3rd party regexp packages for Java floating around:
* [http://java.sun.com/docs/books/tutorial/essential/regex/ java.util.regex] The most widely used for regular expressions now due to its inclusion in the JDK since Java 4
* [http://jakarta.apache.org/regexp/index.html Jakarta] Around since 1996, Jakarta was donated to the Apache Software Foundation and is under an open-source, BSD style license
* [http://www.brics.dk/~amoeller/automaton/ dk.brics.automaton] Automaton is known for being the fastest of the Java regexp implementations
* And the list goes on...
= References =
* [http://www.regular-expressions.info/ruby.html Ruby Regexp Class - Regular Expressions in Ruby]
* [http://www.regular-expressions.info/java.html Using Regular Expressions in Java]
* [http://java.sun.com/docs/books/tutorial/essential/regex/ java.util.regex]
* [http://jakarta.apache.org/regexp/index.html Jakarta]
* [http://www.brics.dk/~amoeller/automaton/ dk.brics.automaton]
-- Michael Frisch (Tuesday, June 3, 2008)
-- Michael Frisch (Tuesday, June 3, 2008)

Revision as of 22:01, 3 June 2008

Regular expressions in Ruby versus Java

Brief summary

Ruby supports regular expressions as a language feature without the inclusion of any special classes or modules. Java on the other hand does native regular expression support and it requires the use of special regular expression packages to use them.

Ruby regexp support in more depth

Java regexp support in more depth

Java has been around for a while have has never had native regexp support. Because of this regular expression packages had to be created. There was no comprehensive support for regexp support from Java's main contributor, Sun, until Java 4. Because of this there are multiple 3rd party regexp packages for Java floating around:

  • java.util.regex The most widely used for regular expressions now due to its inclusion in the JDK since Java 4
  • Jakarta Around since 1996, Jakarta was donated to the Apache Software Foundation and is under an open-source, BSD style license
  • dk.brics.automaton Automaton is known for being the fastest of the Java regexp implementations
  • And the list goes on...

References

-- Michael Frisch (Tuesday, June 3, 2008)