Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lehrkraefte:blc:informatik:glf4-20:datenextraktion [2021/02/08 13:42] Ivo Blöchliger [Zeichenklassen] |
lehrkraefte:blc:informatik:glf4-20:datenextraktion [2021/02/08 14:08] (current) Ivo Blöchliger |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Regular Expressions ====== | ====== Regular Expressions ====== | ||
+ | |||
+ | ===== Ausprobieren in der Konsole ===== | ||
+ | Wichtig: Das Module '' | ||
+ | <code python> | ||
+ | import re | ||
+ | |||
+ | re.findall(" | ||
+ | # Liefert [" | ||
+ | |||
+ | re.findall(" | ||
+ | # Liefert [(" | ||
+ | </ | ||
+ | |||
===== Cheat Sheet ===== | ===== Cheat Sheet ===== | ||
Line 20: | Line 33: | ||
| \s | Ein Leerschlag oder Tabulator| | | | | \s | Ein Leerschlag oder Tabulator| | | | ||
| \n | Ein Zeilenumbruch | | | | | \n | Ein Zeilenumbruch | | | | ||
- | | \\ | Ein Backslash | \ | / | | + | | < |
| \. | Ein Punkt | . | x | | | \. | Ein Punkt | . | x | | ||
| \( | Eine Klammer | ( | ) | | | \( | Eine Klammer | ( | ) | |