File: test.vala

package info (click to toggle)
gitg 3.32.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,748 kB
  • sloc: ansic: 1,635; ruby: 1,466; sh: 314; python: 259; xml: 56; makefile: 15
file content (15 lines) | stat: -rwxr-xr-x 334 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env vala
message ("hello world!");

Regex regexp = new Regex(".*(?:\\s|\\R)*(?P<message>(?:.|\\R)*?)\\s*$");


var m = "hello world\r\n  Riti toti.\r\nasdf adfa      \r\n   a    \r\n            ";
MatchInfo minfo;

if (regexp.match(m, 0, out minfo))
{
   var mes = minfo.fetch_named("message");
   message(":"+mes+":");
}