Re: [Vala] GLib.Rex Pattern
- From: Abderrahim Kitouni <a kitouni gmail com>
- To: Daniel Espinosa <esodan gmail com>
- Cc: Vala-list <vala-list gnome org>
- Subject: Re: [Vala] GLib.Rex Pattern
- Date: Fri, 5 Apr 2013 21:30:33 +0100
Hello,
Le vendredi 5 avril 2013, Daniel Espinosa a écrit :
I'm using:
class Ip : Object {
public static string PATTERN="(([0-2]?[0-5]{1,2})|([0-1]\d\d)|(\d
\d))\.(([0-2]?[0-5]{1,2})|([0-1]\d\d)|(\d
\d))\.[0-2]?[0-5]{1,2}\.(([0-2]?[0-5]{1,2})|([0-1]\d\d)|(\d\d))"
}
On compile I get error for invalid scape sequence.
\d is an invalid escape sequence. Since you need a backslash, you need to
either escape it (by doubling it) or use a literal string """...""".
HTH,
Abderrahim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]