Devam Ediyor

476806 PHP preg_replace regex

I need the regex(s) that goes with php's preg_replace to substitute each occurrence of the phrase "replace me" with the phrase "replaced" in the non-html tagged content (this is the important part!) shown below.

Consider content within the square brackets ([ ...replace me ... ]) and content between opening and closing tags ([...] ... replace me ... [/...]) as html tagged content.

Examples

1) $content = [img src="[url removed, login to view]" title="replace me" alt="replace me with something"]can this replace me be changed

2) $content = [img src="[url removed, login to view]" title="replace me" alt="replace me with something"]can this [a href="EXAMPLE"]replace me[/a] be changed

3) $content = [img src="[url removed, login to view]" title="should we replace me or not" alt="replace me"]can this [a href="EXAMPLE"]replace me[/a] be changed

4) $content = [img src="[url removed, login to view]" title="replace me" alt="replace me with something"]can this [a href="EXAMPLE"]replace me forever[/a] be changed

Let me know that you understand the request by telling my how many of the (12) occurrences of the phrase "replace me" from the four examples should be substituted with "replaced".

$content = preg_replace("/YOUR CODE HERE/", "replaced", $content);

Using more than one occurrence of preg_replace is OK.

Thanks.

Dave

P.S. - I'll pay through escrow. No, I don't give ratings out before the final delivery. Thanks.

Beceriler: Her şey Kabul, PHP

Daha fazlasını görün: using regex in c, regex is, regex in c, regex examples, regex example, regex c, pay through escrow, opening of escrow, regex &, Regex, php regex, final alt, c++ regex, c regex, php regex html, php image href, php brackets, html regex, regex php, brackets, brackets php, src php, html jpg php, php ratings, ratings php

İşveren Hakkında:
( 22 değerlendirme ) Boise, United States

Proje NO: #2222713

Seçilen:

dino8x

Hello sir, Please check PM. Thank you.

1 gün içinde 10$ USD
(0 Değerlendirme)
0.0