This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
kb:zapisi:regex_main [2023/08/15 14:32] – [Grouping and capturing — ()] milano | kb:zapisi:regex_main [2023/08/15 14:36] – [ILI operater — | ili []] milano |
---|
===== ILI operater — | ili [] ===== | ===== ILI operater — | ili [] ===== |
| |
''a(b|c)'' odgovara nizu koji ima **a** praćeno sa **b** //ili// **c** | ''a(b|c)'' odgovara nizu koji ima **a** praćeno sa **b** //ili// **c** \\ |
''a[bc]'' isto kao i prethodni | ''a[bc]'' isto kao i prethodni |
| |
Ako odlučimo da damo ime grupama (koristeći ''(?<foo>…)''), moći ćemo da preuzmemo vrednosti grupe koristeći rezultat podudaranja kao rečnik gde će ključevi biti ime svake grupe . | Ako odlučimo da damo ime grupama (koristeći ''(?<foo>…)''), moći ćemo da preuzmemo vrednosti grupe koristeći rezultat podudaranja kao rečnik gde će ključevi biti ime svake grupe . |
| |
===== Bracket expressions — [] ===== | ===== Izrazi zagrade — [] ===== |
| |
''[abc]'' matches a string that has **either an a or a b or a c** is the **same as a|b|c ** \\ | ''[abc]'' podudara se sa nizom koji ima **ili a ili b ili c** koje je **isto kao a|b|c ** \\ |
''[a-c]'' same as previous \\ | ''[a-c]'' isto kao i prethodni \\ |
''[a-fA-F0-9]'' a string that represents **a single hexadecimal digit, case insensitively** \\ | ''[a-fA-F0-9]'' a string that represents **a single hexadecimal digit, case insensitively** \\ |
''[0-9]%'' a string that has a character **from 0 to 9 before a % sign** \\ | ''[0-9]%'' a string that has a character **from 0 to 9 before a % sign** \\ |