string replace or preg_replace
string replace or preg_replace
- Started
- Last post
- 6 Responses
- to
good morning boys and girls...can someone point me to the right direction, please.
i have to replace my php-echo-output
»JUNE 29, 2009–JULY 5, 2009«
with just »last week«
<code>
<?php
ob_start();
wp_get_archives('type=weekly&limit=1');
$wklyarchives = ob_get_contents();
ob_end_clean();
$wklyarchives = preg_replace('%\&\#8211\;[a-zA-Z0-9, ]*\</a\>%s', 'last week</a>', $wklyarchives);
</code>
- ********0
- neverblink0
\w+\s\d{1,2},\s\d{4}.\w+\s\d{1,2...
- neverblink0
word-length exeded max.
The elipses should be:},\s\d{4}
- to0
thanx neverblink...i'm stucking with this reg-stuff puhhh
- neverblink0
check out www.regular-expression.info they have a easy to follow tutorial/reference that will help you learn it
- to0
hy, your link is great to use - thanx again