[racket] Is there a symbol in regexp-match syntax, similar to the period but...

From: Don Green (infodeveloperdon at gmail.com)
Date: Wed May 8 12:06:21 EDT 2013

Is there a symbol in regexp-match syntax, similar to the period but... a
representation for all the characters to one side of the pattern?

For example, the period below represents the pattern and a single character
to the right of the pattern 'x':

(regexp-match #rx"x." "12x4x6") ; => '("x4")


The ___ below represents the pattern and all the remaining characters in
the string to the right of the pattern 'x':

(regexp-match #rx"x___" "12x4x6") ; => '("x4x6")


I realize I could place a period for each character I want matched but the
number of characters will vary.  I imagine there might be a better way than
creating a function that counts the number of characters and then another
function that creates a regexp-match expression and another function that
runs that function.

Thanks for the advice.

Don Green
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130508/7a4e4e8d/attachment.html>

Posted on the users mailing list.