This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision |
kb:zapisi:regex_main [2023/08/16 08:59] – [Advanced topics] milano | kb:zapisi:regex_main [2023/08/16 09:04] – [Boundaries — b and B] milano |
---|
====== Napredne teme ====== | ====== Napredne teme ====== |
| |
===== Boundaries — b and B ===== | ===== Granice — b i B ===== |
''\babc\b'' performs a **"whole words only"** search \\ \\ | ''\babc\b'' vrši **"samo cele reči"** pretragu \\ \\ |
| |
''\b'' represents an **anchor like caret** (it is similar to ''$'' and ''^'') matching positions where **one side** is a word character (like ''\w'') and the **other side** is not a word character (for instance it may be the beginning of the string or a space character). | ''\b'' predstavlja **sidro kao karet** (slično je kao ''$'' i ''^'') odgovarajućim pozicijama gde je **jedna strana** karakter reči (kao ''\ v''), a **druga strana** nije karakter reči (na primer, može biti početak stringa ili razmak). |
| |
It comes with its **negation**, ''\B''. This matches all positions where ''\b'' doesn’t match and could be if we want to find a search pattern fully surrounded by word characters. | |
''\Babc\B'' matches only if the pattern is **fully surrounded** by word characters. | |
| |
| Dolazi sa svojom **negacijom**, ''\B''. Ovo se poklapa sa svim pozicijama na kojima se ''\b'' ne podudara i može biti ako želimo da pronađemo obrazac pretrage u potpunosti okružen znakovima reči. |
| ''\Babc\B'' se podudara samo ako je obrazac **potpuno okružen** znakovima reči. |
===== Back-references — 1 ===== | ===== Back-references — 1 ===== |
| |