⊗ppPmRgLm 242 of 447 menu

Delimiters of Regular Expressions in PHP

Not only #, but also any other characters (except letters and digits) can act as delimiters. For example, let's take the ampersand symbols as delimiters:

<?php echo preg_replace('&a+&', '!', 'text'); ?>

If brackets are used, then the left delimiter is the opening bracket, and the right one is the closing bracket:

<?php echo preg_replace('(a+)', '!', 'text'); ?>

Use the tilde symbol ~ as delimiters.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline