[Vala] vala regex question.
- From: san hoi <hoisan49 gmail com>
- To: vala-list gnome org
- Subject: [Vala] vala regex question.
- Date: Fri, 19 Nov 2010 22:41:35 +0900
// hello.cs
using System;
using System.Text.RegularExpressions;
class HelloWorld {
public static void Main() {
System.IO.StreamReader sr = new
System.IO.StreamReader(@"/opt/the-board/share/vala-0.12/vapi/cairo.vapi");
string gscode = sr.ReadToEnd();
sr.Close();
Console.WriteLine(gscode);
Regex r = new Regex(@"\{.*?\}", RegexOptions.Singleline);
System.Text.RegularExpressions.MatchCollection mc = r.Matches(gscode);
foreach (System.Text.RegularExpressions.Match m in mc)
{
Console.WriteLine(m.Value);
}
}
}
I think that python's dir method is usable. so
$vapidir "cairo-1.0/Matrix" => show matrix detail : pick up from
dictionary {..., "Matrix": matrix_struct_difinition, ... }
maybe usable too...but I don't know vala's multi-line regex matching.
Above code is csharp case. Is enable that vala's case?
Thanks in advance for any help.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]