summaryrefslogtreecommitdiff
path: root/Lookahead.md
diff options
context:
space:
mode:
Diffstat (limited to 'Lookahead.md')
-rw-r--r--Lookahead.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lookahead.md b/Lookahead.md
new file mode 100644
index 0000000..5405b91
--- /dev/null
+++ b/Lookahead.md
@@ -0,0 +1,11 @@
+v the match any statements are like: match `hallo`, `hallobob`, `hallobier`
+
+Negative lookahead: `hallo(?!blaat)`: match any hallo but not in halloblaat
+Positive lookahead: `hallo(?=blaat)`: only match hallo in halloblaat
+
+---
+
+Negative lookbehind: `(?<!hallo)blaat` : match any blaat except in halloblaat
+Positive lookbehind: `(?<=hallo)blaat` : only match blaat in halloblaat
+> Look behind has limited browser compatibility
+