@example
@group
-(rx "/*" ; Initial /*
+(rx "/*" ; Initial /*
(zero-or-more
- (or (not "*") ; Either non-*,
- (seq "*" ; or * followed by
- (not "/")))) ; non-/
- (one-or-more "*") ; At least one star,
- "/") ; and the final /
+ (or (not "*") ; Either non-*,
+ (seq (one-or-more "*") ; or some * followed by
+ (not (or "*" "/"))))) ; neither * nor /
+ (one-or-more "*") ; At least one star,
+ "/") ; and the final /
@end group
@end example
@group
(rx "/*"
(* (| (not "*")
- (: "*" (not "/"))))
+ (: (+ "*") (not (in "*/")))))
(+ "*") "/")
@end group
@end example
In conventional string syntax, it would be written
@example
-"/\\*\\(?:[^*]\\|\\*[^/]\\)*\\*+/"
+"/\\*\\(?:[^*]\\|\\*+[^*/]\\)*\\*+/"
@end example
The @code{rx} notation is mainly useful in Lisp code; it cannot be