Regular expression on a String ?

Author Message

Fabien Scantamburlo

Wednesday 16 April 2008 6:18:14 am

Hi,

I need to apply a regular expression on a String. I can't find a way neither the documentation section, neither the forum section.

Is there a way with template operators (without create my own module/extension) ?

Thanks,

Fab.

Kristof Coomans

Wednesday 16 April 2008 6:54:54 am

Hi Fabien

I only know about this existing one: http://ez.no/developer/contribs/template_plugins/reg_ex_replace
Not sure if you want to replace part of the string or just want to match.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Fabien Scantamburlo

Thursday 17 April 2008 1:37:30 am

I need to apply several actions as :
- match keywords (from datatype keywords) into an XML block
- count first occurrence like [i]preg_match[/i] does.

If templates operators are not usefull enough to do these, how can i add my own operators ?

Thanks,

Fab.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:16:11
Script start
Timing: Jan 31 2025 01:16:11
Module start 'layout'
Timing: Jan 31 2025 01:16:11
Module start 'content'
Timing: Jan 31 2025 01:16:11
Module end 'content'
Timing: Jan 31 2025 01:16:11
Script end

Main resources:

Total runtime0.0209 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0040 588.1328151.2109
Module start 'layout' 0.00410.0030 739.3438220.7031
Module start 'content' 0.00700.0126 960.0469997.8047
Module end 'content' 0.01960.0012 1,957.851633.9922
Script end 0.0208  1,991.8438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002411.2943140.0002
Check MTime0.00104.7263140.0001
Mysql Total
Database connection0.00062.994410.0006
Mysqli_queries0.00167.763030.0005
Looping result0.00000.043410.0000
Template Total0.00084.010.0008
Template load0.00063.090310.0006
Template processing0.00020.867110.0002
Override
Cache load0.00042.151210.0004
General
dbfile0.00146.565780.0002
String conversion0.00000.028640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs