[Mono-list] Would mono support this kind of application?

Kunle Odutola kunle.odutola@virgin.net
Mon, 6 May 2002 01:55:56 +0100

> A very common feature for wiki servers is that the user need not use HTML.
> So I have transform the wiki syntax into HTML. I'd like to make
> heavy use of
> regular expressions here.
> BTW, in Java, I'd have used an anonymous inner class to create a regex
> replace method, something that enumerates a string and applies
> some code to
> any occurence of a regex.  Ruby has a very similar method.
>  String re_replace(String s, String re, IBlock block) {
>     // apply re on s and for each match, call block with the match result
>     // combine a new string where matches are replaced by the the result
>     // of the called block and return that string
>  }
>  ...
>  String s = re_replace("a$A, $B", "(\\$\\w+)", new IBlock() {
>    public String call(Match m) {
>      return macros.get(m.group(1));
>    }
>  });
> In C#, I don't have anonymous classes (aka poor man's closures).  Am I
> suppost to use delegates here?  Or do I have to create a Ruby.NET first?
> ;-)  (Aside, there's already juch a project, but its
> documentation is mostly
> Japanese)

JScript might offer an alternative for this functionality. Rotor (MS's
shared source ECMA implementation) has a JScript compiler written in C# and
there was another offert announced a long time ago on this list. If Rotor's
license permits your intended usage then....