in reply to Regex speed issue

Could you add some data to your test code so we can see what sort of stuff gives it grief?

Some monks will be inclined to benchmark various solutions and a representative data set will help them too.


Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^2: Regex speed issue
by mtsachev (Initiate) on Aug 30, 2005 at 11:44 UTC

    Well the way I'm using it is like <mas:format_date><mas:foo_date></mas:format_date> so first foo_date is replaced by its value and then the callback function takes the contents and processes it according to preferences.

    Another usage is <mas:limit_string max="50">test test</mas:limit_string> it will limit the string length to 50 characters.

    I'm having trouble using a single regex to match both though, for some reason a (.*?) before $this->{mask_end} (in this case >) will not match the first example, i.e. when there're no params to pass to the function.