IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   mIRC Scripting Dersleri (https://www.ircforumlari.net/mirc-scripting-dersleri/)
-   -   $regerrstr - (mIRC 7.51) (https://www.ircforumlari.net/mirc-scripting-dersleri/825473-regerrstr-mirc-751-a.html)

Feragat 16 Haziran 2019 18:05

$regerrstr - (mIRC 7.51)
 
18/09/2017 tarihinde yayınlanan mIRC 7.51 versiyonuna eklenen yeni bir tanım.

Mirc.chm açıklaması
Kod:

$regerrstr
Returns the error string provided by the regular expression library for a failed evaluation.

Açıklama: Regular Expression(regex) Kütüphanesi tarafından başarısız bir değerlendirme için verilen hata mesajını döndürür.

* Parametre veya Properties bulunmamaktadır.

Hata listesi:
Kod:

1: \ at end of pattern
2: \c at end of pattern
3: unrecognized character follows \
4: numbers out of order in {} quantifier
5: number too big in {} quantifier
6: missing terminating ] for character class
7: invalid escape sequence in character class
8: range out of order in character class
9: nothing to repeat
10: [this code is not in use]
11: internal error: unexpected repeat
12: unrecognized character after (? or (?-
13: POSIX named classes are supported only within a class
14: missing )
15: reference to non-existent subpattern
16: erroffset passed as NULL
17: unknown option bit(s) set
18: missing ) after comment
19: [this code is not in use]
20: regular expression is too large
21: failed to get memory
22: unmatched parentheses
23: internal error: code overflow
24: unrecognized character after (?<
25: lookbehind assertion is not fixed length
26: malformed number or name after (?(
27: conditional group contains more than two branches
28: assertion expected after (?(
29: (?R or (?[+-]digits must be followed by )
30: unknown POSIX class name
31: POSIX collating elements are not supported
32: this version of PCRE is compiled without UTF support
33: [this code is not in use]
34: character value in \x{} or \o{} is too large
35: invalid condition (?(0)
36: \C not allowed in lookbehind assertion
37: PCRE does not support \L, \l, \N{name}, \U, or \u
38: number after (?C is > 255
39: closing ) for (?C expected
40: recursive call could loop indefinitely
41: unrecognized character after (?P
42: syntax error in subpattern name (missing terminator)
43: two named subpatterns have the same name
44: invalid UTF-8 string (specifically UTF-8)
45: support for \P, \p, and \X has not been compiled
46: malformed \P or \p sequence
47: unknown property name after \P or \p
48: subpattern name is too long (maximum 32 characters)
49: too many named subpatterns (maximum 10000)
50: [this code is not in use]
51: octal value is greater than \377 in 8-bit non-UTF-8 mode
52: internal error: overran compiling workspace
53: internal error: previously-checked referenced subpattern not found
54: DEFINE group contains more than one branch
55: repeating a DEFINE group is not allowed
56: inconsistent NEWLINE options
57: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number
58: a numbered reference must not be zero
59: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)
60: (*VERB) not recognized or malformed
61: number is too big
62: subpattern name expected
63: digit expected after (?+
64: ] is an invalid data character in JavaScript compatibility mode
65: different names for subpatterns of the same number are not allowed
66: (*MARK) must have an argument
67: this version of PCRE is not compiled with Unicode property support
68: \c must be followed by an ASCII character
69: \k is not followed by a braced, angle-bracketed, or quoted name
70: internal error: unknown opcode in find_fixedlength()
71: \N is not supported in a class
72: too many forward references
73: disallowed Unicode code point (>= 0xd800 && <= 0xdfff)
74: invalid UTF-16 string (specifically UTF-16)
75: name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
76: character value in \u.... sequence is too large
77: invalid UTF-32 string (specifically UTF-32)
78: setting UTF is disabled by the application
79: non-hex character in \x{} (closing brace missing?)
80: non-octal character in \o{} (closing brace missing?)
81: missing opening brace after \o
82: parentheses are too deeply nested
83: invalid range in character class
84: group name must start with a non-digit
85: parentheses are too deeply nested (stack check)

Karma Örnekler:

1-
Kod:

//echo -a $regex(deneme,/denem(e){30000}/) - $regerrstr
-
Sonuç: 0 - regular expression is too large (Parantez içindeki değerin regex için çok büyük olduğu uyarısı)


2- Bu hata ise hexadecimal karakterin kapanış ayraç hatasını yansıtıyor
Kod:

//echo -a $regex(deneme,/den\x{65}me) - $regerrstr
Sonuç: \x65 veya \x{65} e karakteri ile eşleştiği için herhangi bir hata vermedi
-
//echo -a $regex(deneme,/den\x{65me) - $regerrstr
Sonuç: 0 - non-hex character in \x{} (closing brace missing?) - Parantez Kapanmadığı için hex karakteri tanımlayamadı ve hata verdi.

3- [ ] Sınıflandırma ve elşeştirme parantezi kapanmadığı için alınan bir uyarı.

Kod:

//echo -a $regex(deneme,/den[eme) - $regerrstr
Sonuç: 0 - missing terminating ] for character class

4- PCRE - Perl Compatible Regular Expressions (Perl Uyumlu Düzenli İfadeler) tarafından desteklenmeyen operatörler kullanıldığında alınan uyarı.

Kod:

//echo -a $regex(deneme,/den\Lme/) - $regerrstr
//echo -a $regex(deneme,/den\Ume/) - $regerrstr
Sonuç: 0 - PCRE does not support \L, \l, \N{name}, \U, or \u

5- Regex kalıbının sonunda kullanılan \ karakter için uyarı.
Kod:

//echo -a $regex(deneme,/deneme\/) - $regerrstr
Sonuç: 0 - \ at end of pattern

6- Var olmayan referans hatası, e harfi text sonunda 1 kez tekrar ettiği için yakalanan verinin referansı \1 olmalı yani denemee = denem(e)\1 buradaki \1 e yi temsil ettiği için sonuç doğru. \2 de çalışmama mantığı ise text'in denemeee olmamasıdır. Eğer denemeee = denem(e)\2 yani parantez içinde yakalanan e harfi kendisi dışında 2 kez daha tekrar ediyor olsaydı çalışırdı. 1 kez tekrar ettiği için hata verdi.

Kod:

Doğru:  //echo -a $regex(denemee,/denem(e)\1/) - $regerrstr
Yanlış:  //echo -a $regex(denemee,/denem(e)\2/) - $regerrstr
Sonuç:  0 - reference to non-existent subpattern

Daha fazla hata-sonuç ilişkisi için belirtilen versiyon ve üzeri versiyonlarda denemeler yapabilirsiniz. Benden şimdilik bu kadar.

mIRC 7.51 ve üzeri versiyonlar kullanıyorsanız regex kullanırken faydalı bir tanım olacaktır. En azından hatayı bulmak daha kolay hale gelebilir.

Kolay gelsin.

Akabinde 01 Aralık 2021 17:35

Cevap: $regerrstr - (mIRC 7.51)
 
emegine saglık


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

Powered by vBulletin® Version 3.8.8 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2024 IRCForumlari.Net