File: test.vala

package info (click to toggle)
gitg 3.30.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 18,520 kB
  • sloc: ansic: 1,635; ruby: 1,466; sh: 314; python: 259; xml: 121; makefile: 40
file content (15 lines) | stat: -rwxr-xr-x 334 bytes parent folder | download | duplicates (2)
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+":");
}