Created
January 31, 2014 09:26
-
-
Save aligundogdu/8728938 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$metin = "{{<strong>selami</strong><br/>}}askldjakldjadkljas{{şahin}}"; //İlk Deneme | |
$metin = '{{</w:t></w:r><w:proofErr w:type="gramStart"/><w:r w:rsidR="00B01C59" w:rsidRPr="00B01C59"><w:t>Sinif.isim</w:t></w:r><w:proofErr w:type="gramEnd"/><w:r w:rsidR="00B01C59" w:rsidRPr="00B01C59"><w:t>}}'; //Orj | |
$metin = '{{isim}} {{</w:t></w:r><w:proofErr w:type="gramStart"/><w:r w:rsidR="00B01C59" w:rsidRPr="00B01C59"><w:t>Sinif.isim</w:t></w:r><w:proofErr w:type="gramEnd"/><w:r w:rsidR="00B01C59" w:rsidRPr="00B01C59"><w:t>}}'; //Son | |
echo $metin; | |
$metin = preg_replace('/<[^>]*>/', '', $metin); //Regex ile diret stip tags | |
preg_match_all("/\{\{(.*)\}\}/USi", $metin, $array); | |
print_r($array); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment