Skip to content

rgxExclamationPoint

Loïc Antignac edited this page Dec 31, 2020 · 10 revisions

Point d’exclamation !

const rgxExclamationPoint = new RegExp(`(?<!\u00a0|^)\\${data.exclamationPoint}|\\${data.exclamationPoint}(?! |$)`, 'gmi');

   
Regex générée :

/(?<!\u00a0|^)\!|\!(?! |$)/gim

Règle typographique :
Une espace insécable avant, une espace après.

Détecte :

  • un point d’exclamation ! non précédé par une espace insécable
    Exceptions :
    • s’il débute la chaîne
  • ou un point d’exclamation non suivi par une espace
    Exceptions :
    • s’il termine la chaîne

    


<< rgxCloseBrace     |     rgxPlusSign >>

Clone this wiki locally