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 revision Previous revision
informatique:regexp [2019/09/09 10:34]
pteu [exclure un motif]
informatique:regexp [2019/09/09 10:42] (current)
pteu [exclure un motif]
Line 59: Line 59:
 =====Exemples===== =====Exemples=====
  
-  * matcher ​tout sauf MOTIF (exclure le motif)+  * matcher ​chaque ligne qui ne contient pas le MOTIF (exclure le motif)
 <code bash> <code bash>
 ^((?​!MOTIF).)*$ ^((?​!MOTIF).)*$
 +
 +# alt : ne pas matcher les lignes qui commencent par MOTIF :
 +^(?​!MOTIF).*$
 </​code>​ </​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]] 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]]
informatique/regexp.1568018051.txt.gz · Last modified: 2019/09/09 10:34 by pteu