Re: [Vala] Regex question
- From: pancake <pancake youterm com>
- To: Бака Гайдзин <troorl gmail com>
- Cc: "vala-list gnome org" <vala-list gnome org>
- Subject: Re: [Vala] Regex question
- Date: Tue, 22 Dec 2009 08:50:24 +0100
What do you think about bringing regexpes to vala, like perl does with
the =~ operator?
On Dec 20, 2009, at 9:01 PM, Бака Гайдзин <troorl gmail com>
wrote:
Ok, I solved the problem with match_all_full in loop.
2009/12/20 Бака Гайдзин <troorl gmail com>:
Hi.
I need to replace all URLs in text on links. I'm doing the
following things:
urls = new Regex("((http|https|ftp)://([\\S]+))");
var result = urls.replace(text, -1, 0, "<a href='\\0'>\\0</a>");
Ok, this works fine. But also I need to cut long URLs (longer than 20
chars, for example). How can I do this thing? I look to the
replace_eval method, but I don't understand how to use it.
Thanks in advance and sorry for my English.
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]