I have been using regexp-match<div>specifically -- </div><div>(regexp-match "(1)\1" "112")</div><div>I'm 100% positive I'm missing some dorky character that will make this work.<br clear="all">-Justin<br>
<br><br><div class="gmail_quote">On Fri, Oct 29, 2010 at 2:33 PM, Carl Eastlund <span dir="ltr"><<a href="mailto:cce@ccs.neu.edu">cce@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm not sure I know what problem you're running into, but if you use<br>
Perl regular expression be sure to use (pregexp ...) to compile them<br>
or #px"..." to write them. Otherwise you get a slightly different<br>
regular expression language (compatible with Unix utilities like<br>
egrep, rather than with Perl). If you're using those regular<br>
expressions, they don't have backreferences.<br>
<font color="#888888"><br>
Carl Eastlund<br>
</font><div><div></div><div class="h5"><br>
On Fri, Oct 29, 2010 at 5:29 PM, Justin Phillips<br>
<<a href="mailto:jjustinphillipss@gmail.com">jjustinphillipss@gmail.com</a>> wrote:<br>
> I'm trying to write a small regex that would return any repeating pattern in<br>
> a string e.g. ("ababcdcdababcdcd" would return "ab" "cd" abab" "cdcd"<br>
> "ababcdcd")<br>
> I'm having trouble using the backreferencing. I see under section 3.7.2 of<br>
> the guide (and also some Perl docs I've checked out) that I should be able<br>
> to write a simple regex "(1)\1" which would return true for the data "113"<br>
> but Racket says I'm wrong. Any help would be greatly appreciated.<br>
> -Justin<br>
</div></div></blockquote></div><br></div>