If I wanted to implement a regex engine in JavaME (Which lacks the regex libraries), where would be the best place to start? I'm imagining there is existing regex code out there which it would be possible to use as a starting point for porting.
Failing that, a good guide on how to compile and execute a regular expression would do.
JMeter interprets forms of regular expressions or patterns being used throughout a JMeter test plan, by including the pattern matching software Apache Jakarta ORO. With the use of regular expressions, we can certainly save a lot of time and achieve greater flexibility as we create or enhance a Test Plan.
A regular expression can be a single character, or a more complicated pattern. Regular expressions can be used to perform all types of text search and text replace operations. Java does not have a built-in Regular Expression class, but we can import the java.util.regex package to work with regular expressions.
These patterns are used with the exec () and test () methods of RegExp, and with the match (), matchAll (), replace (), replaceAll (), search (), and split () methods of String. This chapter describes JavaScript regular expressions. You construct a regular expression in one of two ways:
There is also documentation on an older incarnation of the product at OROMatcher User's guide, which might prove useful. The pattern matching is very similar to the pattern matching in Perl. A full installation of Perl will include plenty of documentation on regular expressions - look for perlrequick , perlretut, perlre and perlreref .
Could you investigate third party RegEx libraries, such as http://www.brics.dk/~amoeller/automaton/ ?
Could you analyse your requirements and simplify your needs to something that doesn't need a RegEx library?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With