Hi,<br><br>I've a couple of questions about regular expressions in Erlang:<br>* Is it possible to capture groups? When I use a pattern "foo(bar)" against string "foobar" I expect to be able to access substring "bar" captured in grouping brackets.
<br>* Why "curly bracket" quantifiers can't be used? I mean, usually pattern "fo{2}bar" matches "foobar", but not in Erlang, because regexp module doesn't handle this syntax. Am I right?
<br>* Is it possible to specify some parts of a pattern no to be greedy? Most quantifiers are greedy e.g. *, so it there any way to turn off the greediness in some cases?<br><br>If there are any other decent implementations of regexp available please let me know.
<br><br>Basically, my requirement is to match some strings and extract bits from these. Let's say I have string:<br><br><span class="HcCDpe"></span><img src=\"/icons/folder.gif\" alt=\"[DIR]\"> <a href=\"c3p0-oracle-thin-extras/\">c3p0-oracle-thin-extras/</a> 04-Jan-2007 13:19 -
<br><img src="/icons/text.gif" alt="[TXT]"> <a href="maven-metadata.xml.sha1">maven-metadata.xml.sha1</a> 09-Jul-2006 08:39 132<br><br>and I want to extract "DIR" or "TXT", href value and possible a date and size at the end of each string.
<br><br>In other languages I used to do it using regexp, but now I have to implement my logic in Erlang and I don't know exactly how to accomplish this task.<br><br>Any help would be highly appreciated,<br><br>Kind Regards,
<br>Tomasz<br>