User Tools

Site Tools


informatique:regexp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
informatique:regexp [2018/11/19 13:31] pteuinformatique:regexp [2019/09/09 08:42] – [exclure un motif] pteu
Line 58: Line 58:
  
 =====Exemples===== =====Exemples=====
 +
 +  * matcher chaque ligne qui ne contient pas le MOTIF (exclure le motif)
 +<code bash>
 +^((?!MOTIF).)*$
 +
 +# alt : ne pas matcher les lignes qui commencent par MOTIF :
 +^(?!MOTIF).*$
 +</code>
 +src stackoverflow : [[https://stackoverflow.com/questions/406230/regular-expression-to-match-a-line-that-doesnt-contain-a-word|Regular expression to match a line that doesn't contain a word]]
  
   * Valider une URL :   * Valider une URL :
informatique/regexp.txt · Last modified: 2020/05/24 12:02 by pteu