kb:zapisi:regex_main

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
kb:zapisi:regex_main [2023/08/15 14:40] – [Izrazi zagrade — []] milanokb:zapisi:regex_main [2023/08/15 14:45] – [Greedy and Lazy match] milano
Line 97: Line 97:
 Imajte na umu da svi posebni znakovi unutar izraza u zagradama (uključujući obrnutu kosu crtu) ​​gube svoja posebna ovlašćenja: stoga nećemo primeniti „pravilo bežanja“. Imajte na umu da svi posebni znakovi unutar izraza u zagradama (uključujući obrnutu kosu crtu) ​​gube svoja posebna ovlašćenja: stoga nećemo primeniti „pravilo bežanja“.
  
-===== Greedy and Lazy match =====+===== Pohlepni i lenji se poklapaju =====
  
-The quantifiers ( ''* + {}''are *greedy operators*, so they expand the match as far as they can through the provided text.+Kvantifikatori ( ''* + {}''su *pohlepni operatori*, tako da proširuju podudaranje koliko god mogu kroz dati tekst.
  
 For example, ''<.+>''  matches ''<nowiki><div>simple div</div></nowiki>''  in ''This is a <nowiki><div>simple div</div></nowiki>'' test. In order to catch only the ''div''  tag we can use a ''?''  to make it lazy \\ For example, ''<.+>''  matches ''<nowiki><div>simple div</div></nowiki>''  in ''This is a <nowiki><div>simple div</div></nowiki>'' test. In order to catch only the ''div''  tag we can use a ''?''  to make it lazy \\
  • kb/zapisi/regex_main.txt
  • Last modified: 2023/08/16 09:11
  • by milano