Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
- <g id="svgSteps">
- </g>
- <g id="svgBase">
- </g>
- $fileContent = file_get_contents('my_file');
- $fileContent = preg_replace('/<!--(.|s)*?-->/','',$fileContent);
- file_put_contents('my_file',$fileContent);
- preg_replace("/((<g id=".*">)|(<g>))[s]*(</g>)/",'',$fileContent)
- preg_replace("/(<!--)[sS]*(-->)/",'',$fileContent)
- $fileContent = preg_replace('#<!--.*?-->#s', '', $fileContent);
- $fileContent = preg_replace('#<(w+)(?:s+[^>]+)?>s*</1>#s', '', $fileContent);
- <?php
- $fileContent = '<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> asdlfhjlkasdjhfasdf asd <g id="kjkjkh" /> askdjghf ag <g id="eeee" > </g>ahsdjghakjhglkjdahlg';
- $fileContent = preg_replace('/(<!--(.|s)*-->)?([nwW]*)?/','$3',$fileContent);
- $fileContent = preg_replace('/<[gG]?s+[Ii][Dd]="?w+"s*(?:/>|>)[st]*(</[gG]>)?/', ' ',$fileContent);
- echo($fileContent);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement