En iyi yanıtlayıcılar
Web browser veri alma

Soru
-
Yanıtlar
-
string s = "xxxxxxxx 5"; var sayi = Regex.Match(s,@"\d+"); if (sayi.Success) Console.WriteLine(int.Parse(sayi.Value));
How to create a Minimal, Reproducible Example
The way to Go.
World's most advanced open source (object-) relational Database.
Flutter (for mobile, for web & desktop.- Yanıt Olarak İşaretleyen Kartopuu0 16 Temmuz 2019 Salı 14:46
-
- Yanıt Olarak İşaretleyen CetinBasozEditor 16 Temmuz 2019 Salı 15:28
Tüm Yanıtlar
-
string s = "xxxxxxxx 5"; var sayi = Regex.Match(s,@"\d+"); if (sayi.Success) Console.WriteLine(int.Parse(sayi.Value));
How to create a Minimal, Reproducible Example
The way to Go.
World's most advanced open source (object-) relational Database.
Flutter (for mobile, for web & desktop.- Yanıt Olarak İşaretleyen Kartopuu0 16 Temmuz 2019 Salı 14:46
-
Hocam ben innertext çıktısından otomatik sadece sayıları alsın istiyorum bunu nasıl yapabilirim. Yanlış anlamadıysam siz sabit bir yazıdan çıkarma işlemi yapmışsınız.
Mesela facebooktan web browser aracılığıyla beğeni sayısını labele aktarıyorum.
Böyle çıkıyor "Beğeni sayısı 100"
Benim istediğim labele sadece sayı aktarsın.
foreach (HtmlElement bilgi in bilgiler)
{
if (bilgi.GetAttribute("class").Contains("contentContainer"))
{
if (bilgi.GetAttribute("ClassName").Contains("titleInHeader"))
{
label1.Text = bilgi.InnerText;
}
}
}- Düzenleyen Kartopuu0 16 Temmuz 2019 Salı 14:27
-
string s = "xxxxxxxx 5"; var sayi = Regex.Match(s,@"\d+"); if (sayi.Success) Console.WriteLine(int.Parse(sayi.Value));
How to create a Minimal, Reproducible Example
The way to Go.
World's most advanced open source (object-) relational Database.
Flutter (for mobile, for web & desktop.
-
1) string s = ...innerText yaparsiniz olur biter.
2) using System.Text.RegularExpressions;
How to create a Minimal, Reproducible Example
The way to Go.
World's most advanced open source (object-) relational Database.
Flutter (for mobile, for web & desktop. -
- Yanıt Olarak İşaretleyen CetinBasozEditor 16 Temmuz 2019 Salı 15:28