Re: [Vala] Apply a RegEx in Vala
- From: Rodrigo Cares <rcares gmail com>
- To: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Apply a RegEx in Vala
- Date: Fri, 02 Dec 2011 16:21:51 -0300
Hi,
You need save the result of replace function:
void main() {
var my_regex = new Regex ("[^a-zA-Z0-9]");
string my_string = "Hello World()///";
string res = my_regex.replace (my_string, my_string.length, 0,
"");
print ("%s\n", res);
}
El vie, 02-12-2011 a las 19:00 +0000, David Gomes escribió:
var my_regex = new Regex ("[^a-zA-Z0-9]");
string my_string = "Hello World()///";
my_regex.replace (my_string, my_string.length, 0, "");
print ("%s\n", my_string);
--
Rodrigo Cares <rcares gmail com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]