diff options
Diffstat (limited to 'chapter-2')
-rw-r--r-- | chapter-2/2.2-regular-expressions.scm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/chapter-2/2.2-regular-expressions.scm b/chapter-2/2.2-regular-expressions.scm index 21e3aad..056318a 100644 --- a/chapter-2/2.2-regular-expressions.scm +++ b/chapter-2/2.2-regular-expressions.scm @@ -368,3 +368,26 @@ "frogdog" "frogcat" '(not "frogfrog")) (grep-test (s-regexp->bre (r:repeat 3 5 (r:alt (r:quote "cat") (r:quote "dog")))) "catdogcat" "dogcatdogcat" "catcatcatdogdog" '(not "catdogfrogcatcat")) + + +;; Exercise 2.9: Back-references + + +;; Exercise 2.10: Standards? + +;; a + +;; Differences between BREs and EREs: + +;; - BREs use \( and \) for grouping, EREs use ( and ) + +;; - BREs use \{ and \} for intervals, EREs use { and } + +;; - BREs do not support alternation (non-standard GNU extension +;; provides it), but EREs do. + +;; - GNU-extended BREs use \| for alternation, EREs use | + +;; b + +;; c |