Guest User

Utilisation de preg_replace

a guest
Sep 8th, 2010
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.50 KB | None | 0 0
  1. <?php
  2. $src = "<br><p><span style='font-weight: bold; font-size: 16pt;'>Un russissant anglais au 16e-17e siècle. Richard James. (1592-1638). </span></p><br><p><span style='color: rgb(72, 61, 139); font-weight: bold; font-size: 12pt;'>Référence stock:</span> 21481</p><p><span style='color: rgb(128, 0, 0); font-weight: bold; font-size: 12pt;'>Auteur: </span> PSALMON Frédéric</p><p><span style=' font-weight: bold; font-size: 12pt; color: rgb(128, 0, 0);'>Commentaires Bibliographiques: </span> Article extrait du Bulletin de Géographie Historique et Descriptive. </p><p><span style=' font-weight: bold; font-size: 12pt; color: rgb(128, 0, 0);'>Préface / Traducteur / Illustrateur: </span> </p><p><span style=' font-weight: bold; font-size: 12pt; color: rgb(128, 0, 0);'>Éditeur: </span> </p><p><span style=' font-weight: bold; font-size: 12pt; color: rgb(128, 0, 0);'>Collection: </span> </p><p><span style=' font-weight: bold; font-size: 12pt; color: rgb(128, 0, 0);'>Année: </span> 1911. </p><p><span style=' font-weight: bold; font-size: 12pt; color: rgb(128, 0, 0);'>Description / État: </span> Broché. 54 pages. Couverture factice. Petite déchirure en bas de page. </p><p><span style=' font-weight: bold; font-size: 12pt; color: rgb(128, 0, 0);'>Thèmes de l'ouvrage: </span> LANGUE-LINGUISTIQUE,RUSSIE</p><p><span style=' font-weight: bold; font-size: 12pt; color: rgb(128, 0, 0);'>ISBN: </span> </p><br><br>";
  3. echo '<pre>', $src, '</pre><hr />';
  4. echo '<pre>', preg_replace('!<[^>]+>!Us', '', $src), '</pre>';
  5. ?>
Add Comment
Please, Sign In to add comment