wb-archiv283/branches/2.8.x/wb/include/quickSkin_alpha/_lib/qx/qx_regex.php @ 1585
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* QuickSkin Extension regex
|
4 |
* Regular Expression String Replace
|
5 |
*
|
6 |
* Usage Example:
|
7 |
* Content: $template->assign('NAME', '*My Document*');
|
8 |
* Template: Document Name: {regex:NAME,'/[^a-z0-9]/i','_'}
|
9 |
* Result: Document Name: _My_Document_
|
10 |
*
|
11 |
* @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
|
12 |
*/
|
13 |
function qx_regex ( $param, $pattern, $replace ) { |
14 |
return preg_replace( $pattern, $replace, $param ); |
15 |
}
|