IRCForumu.Net - Türkiye'nin IRC ve mIRC Kullanıcılarının Buluştuğu Forum

IRCForumu.Net - Türkiye'nin IRC ve mIRC Kullanıcılarının Buluştuğu Forum (https://www.ircforumu.net/)
-   mIRC Tanımlar (https://www.ircforumu.net/mirc-tanimlar/)
-   -   $regmlex (https://www.ircforumu.net/mirc-tanimlar/2820-regmlex.html)

Feragat 01 Temmuz 2016 00:29

$regmlex
 
25/03/2016 Tarihli, mIRC v7.44 Sürümünde karşımıza çıkan yeni bir tanım.

Orjinal açıklaması (Kaynak: https://www.mirc.com/whatsnew.txt)
-
Kod:

53.Added $regmlex(name,M,N) where M is the match number (in case of
  multiple /g global matches) and N is the () group number. If N is not
  specified, it defaults to 1.

mirc.chm açıklaması
-
Kod:

$regmlex([name], M, N)

If the /g modifier is used with a pattern, multiple results can be returned for that pattern. This identifier allows you to retrieve these results, where M is the Mth result and N is the () capture group number in that result. If N is not specified, it defaults to 1.

This identifier supports the same properties as $regml().

Eğer regex /g Global yakalama operatörü ile modifiye edilmişse, parantez () ile yakalanan veri filtre düzenine göre gruplandırılır ve $regmlex ile grupları ve grup elemanlarını görebiliriz. M grup numarasını, N ise grup elemanını temsil eder. N = 0 girilmişse gruptaki toplam eleman sayısını görürüz.

Not: $regml() tanımındaki mevcut properties'ları kullanabilirsiniz.

Örnekler:

Kod:

//echo -a $regex(abcdef,/([a-z])([a-z])/g)  -  1. grup eleman sayısı: $regmlex(1,0)  --- 2.grup eleman sayısı: $regmlex(2,0)  --- 3.grup eleman sayısı: $regmlex(3,0)
Sonuçlar: 2

Açıklaması:
-
regex filtresi ile /([a-z])([a-z])/g text'i 2 şer elemanlı gruplar halinde gruplandırdı.
-
Kod:

1.grup: a - b  = $regmlex(1,1) - $regmlex(1,2)
2.grup: c - d  = $regmlex(2,1) - $regmlex(2,2)
3.grup: e - f  =  $regmlex(3,1) - $regmlex(3,2)



Başka bir örnek:

Kod:

//echo -a $regex(abcdef,/([a-z])([a-z])([a-z])/g)  -  1. grup eleman sayısı: $regmlex(1,0)  --- 2.grup eleman sayısı: $regmlex(2,0)
Sonuçlar: 3

Açıklaması:
-
belirtilen regex filtresi ile /([a-z])([a-z])([a-z])/g text'i, 3'er elemanlı 2 grup olarak gruplandırdı.

Kod:

1.grup: a - b - c  = $regmlex(1,1) - $regmlex(1,2)  - $regmlex(1,3)
2.grup: d - e - f  = $regmlex(2,1) - $regmlex(2,2)  -  $regmlex(2,3)

Kolay gelsin gençler.


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 01:47.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0
Copyright ©2005 - 2023 IRCForumu.Net - Tüm Hakları Saklıdır.