You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-user@jakarta.apache.org by Millington Roger <ro...@barclaycard.co.uk> on 2001/06/18 12:17:22 UTC

Thread safety

Hi All,

I have been investigating the various Java regular expression engines
available and have decided I will not be using jakarta-regexp-1.2! I
reported a 'feature or bug' earlier (semantics of {0,3} is that of {1,3})
which I now consider to be a 'bug'. I have since found that an email match
regular expression I use will not compile with jakarta-regexp-1.2 but it
will compile with GNU-regexp-1.0.8, jakarta-oro-2.0.3, IBM's regex4j and the
original ORO.

These two 'features' themselves are enough to stop me using
jakarta-regexp-1.2 but I have become more concerned with 'thread safety'.
'jakarata-regexp-1.2' holds information about a match within the regular
expression object so it is not thread safe!  It uses the getParen(index)
method to extract the stored value matched by a particular parenthesis.

In common with most Java developers, the developments I am concerned with
are multi-threaded and life is much easier if the libraries one uses are
thread safe.

I am actively looking at thread safety issues within gnu-regexp-1.0.8,
jakarta-oro-2.0.x and IBM regex4j.  'gnu-regexp-1.0.8' looks to be thread
safe. 'jakarta-oro-2.0.x' may be thread safe but I need to be sure that the
pattern matcher classes hold all the match information. 'regex4j' looks to
be thread safe but I have more work to do on this.

Regards
  Roger Millington








Legal Disclaimer:-

Please be aware that messages sent over
the Internet may not be secure and should
not be seen as forming a legally binding
contract unless otherwise stated.