Regex Nedir?
Regex yazıda harf, kelime veya cümle karşılaştırma ve arama işlemlerini yapmamızı gerçekleştiren komuttur.
mIRC’te aynı işin yapan başka komutlar da mevcuttur ancak regex hem daha hızlıdır hem de arama yelpazesi
çok geniş olduğundan büyük kolaylıklar sağlar. Örnek vermek gerekirse;
if (*deneme* iswm $1-) veya if (deneme isin $1-) komutları ile,
if ($regex($1-,deneme)) veya if ($regex($1-,deneme) == 1) komutları aynıdır.
; Regex Kullanımı
Regex, en basitinden $regex(Satır,Aranacak Kelime) şeklinde kullanılır. Daha görsel bir örnek vermek gerekirse;
//echo -a * $regex(Bu bir deneme yazısıdır,deneme) yazdığınızda satır içinde aradığımız kelime (deneme) geçtiğinden
size 1 değeri olarak geri döner. Eğer $regex(Bu bir deneme yazısıdır,merhaba) olsaydı bu 0 değeri olarak geri dönecekti.
; Regex Operatörleri
1) “.” (Herhangi bir karakter operatörü)
Tanımdan da anlaşılacağı gibi herhangi bir karakter demektir. Örnek olarak: //echo -a * $regex(Bu bir deneme yazısıdır,b.r)
yazdığımızda değer 1 olarak dönecektir. Burada b ile r harfi arasında ne olacağı önemli değildir, herhangi bir karakter olması
yeterlidir.
2) “+” (Bir tane veya birden çok olabilir operatörü)
//echo -a * $regex(Bu bir deneme yazısıdır,bi+r) yazdığımızda değer 1 olarak döner. Çünkü bir tane i satırımızda mevcut. Eğer
//echo -a *$regex(Bu biiiiir deneme yazısıdır,bi+r) olursa değer gene 1 olur. Çünkü “+” operatöründe birden fazla olması değeri de
1 dir.
3) “?” (Hiç olmayabilir veya bir tane olabilir operatörü)
“.” operatöründen tek farkı herhangi bir karakter gelme zorunluluğun olmaması. Örnek: //echo -a * $regex(Bu bir deneme yazısıdır,b?r)
1 değeri olarak döneceği gibi //echo -a * $regex(Bu br deneme yazısıdır,b?r) de 1 olarak geri döner.
4) “|” (Veya Operatörü)
if (a == b) || (c == d) komutunda nasıl -a b ye eşit veya c d ye eşit ise komut uygula- mantığı varsa onun aynısını kullanabiliyoruz. Örnek olarak
//echo -a * $regex(Bu bir deneme yazısıdır,merhaba|deneme) yazdığımızda merhaba yazısı satırımızda geçmemesine rağmen deneme kelimesi
olduğu için 1 değeri olarak geri dönecektir.
5) “^” (Başlama operatörü)
Eğer aranan kelimenin önüne ^ konulursa, aranan kelime cümlenin ilk kelimesi olmalı ki değer 1 olarak dönsün. Örnek olarak
//echo -a * $regex(Bu bir deneme yazısıdır,^bir) yazarsak değer 0 olur. //echo -a * $regex(Bu bir deneme yazısıdır,^bu bir) yazdığımızda ise
değer 1 olacaktır. Kısacası (bu* iswm bu bir deneme yazısıdır) ile aynı işlevi görmektedir.
6) “$” (Bitirme operatörü)
Kullanım mantığı ^ ile tamamen aynıdır. Şöyle ki; //echo -a * $regex(Bu bir deneme yazısıdır,$yazısıdır) yazdığımızda 1 olarak geri dönecektir.
Veya //echo -a * $regex(Bu bir deneme yazısıdır,$dır) yine 1 olarak döner.
7) “-” (Aralık operatörü)
Belirli aralıkları karşılaştırmamızı sağlar. Örneğin [1-9] birden dokuza kadar, [a-z] a dan z ye kadar küçük harfler [a-c] a dan c ye kadar küçük
harfleri aratmamıza olarak sağlar. //echo -a * $regex(3,[1-5]) değeri 1 olarak döner. //echo -a * $regex(5,[1-5]) 1 olarak döner. //echo -a * $regex(8,[1-5])
0 olarak döner.
8 )Kelime Operatörleri
8.1) “\bKELİME\b” Operatörü
Eğer kelime tam anlamıyla eşitse 1 olarak geri döner: //echo -a * $regex(DeNeMe,\bDeNeMe\b)
//echo -a * $regex(Bu bir deneme yazısıdır,\bBu\b) gibi…
8.2) “\s” Operatörü
Herhangi bir boşluk varsa 1 olarak geri döner: //echo -a * $regex(Bu bir deneme yazısıdır,\s)
8.3) “\d” Operatörü
Satırın içinde herhangi bir sayı varsa 1 olarak döner: //echo -a * $regex(Bu b1r deneme yazısıdır,\d)
1 Oca 2009
Windows Kısayol Tuşları
Windows kısa yol tuşları.
Birçok Windows klavye kısa yolları yeni işletim sisteminin pencerelerinin sürüklendiği ve bırakıldığı andaki davranışlarını taklit ediyor. Size Mouse yerine klavye kullandıracak kısa yollardan bazılarını veriyoruz.
[Windows + Yukarı Ok] – Ekranı Kapla
[Windows + Aşağı Ok] – Simge Durumuna Küçült / Önceki Duruma Döndür
[Windows + Sol Ok Tuşu] – Pencereyi Sol Kenara Yasla
[Windows + Sağ Ok Tuşu] – Pencereyi Sağ Kenara Yasla
[Windows + Shift + Yukarı Ok Tuşu] – Dikey Olarak Ekranı Kapla
[Windows + Shift + Aşağı Ok Tuşu] – Dikey boyutu Geri Al
[Windows + Shift + Sol Ok Tuşu] – Pencereyi Sol Monitöre Taşı
[Windows + Shift + Sağ Ok Tuşu] – Pencereyi Sağ Monitöre Taşı
Birçok Windows klavye kısa yolları yeni işletim sisteminin pencerelerinin sürüklendiği ve bırakıldığı andaki davranışlarını taklit ediyor. Size Mouse yerine klavye kullandıracak kısa yollardan bazılarını veriyoruz.
[Windows + Yukarı Ok] – Ekranı Kapla
[Windows + Aşağı Ok] – Simge Durumuna Küçült / Önceki Duruma Döndür
[Windows + Sol Ok Tuşu] – Pencereyi Sol Kenara Yasla
[Windows + Sağ Ok Tuşu] – Pencereyi Sağ Kenara Yasla
[Windows + Shift + Yukarı Ok Tuşu] – Dikey Olarak Ekranı Kapla
[Windows + Shift + Aşağı Ok Tuşu] – Dikey boyutu Geri Al
[Windows + Shift + Sol Ok Tuşu] – Pencereyi Sol Monitöre Taşı
[Windows + Shift + Sağ Ok Tuşu] – Pencereyi Sağ Monitöre Taşı
Bat Komutları
Win server 2008, Vista ve Win 7 üstü
msg /server: 'Bilgisayar veya Server Adı' administrator "Please contact help desk immediately!"
Win server 2003 ve xp için message
net send 'Bilgisayar veya Server Adı' "Icewarp" kopyalama tamamlandi
Ekrana Mesaj yazar.
--------------------------------------------------------
XCOPY
Copies files and directory trees.
XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
[/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B]
[/EXCLUDE:file1[+file2][+file3]...]
source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set,
doesn't change the attribute.
/M Copies only files with the archive attribute set,
turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string
should be in a separate line in the files. When any of the
strings match any part of the absolute path of the file to be
copied, that file will be excluded from being copied. For
example, specifying a string like \obj\ or .obj will exclude
all files underneath the directory obj or all files with the
.obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/V Verifies the size of each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/G Allows the copying of encrypted files to destination that does
not support encryption.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attribute
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.
/B Copies the Symbolic Link itself versus the target of the link.
/J Copies using unbuffered I/O. Recommended for very large files.
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.
msg /server: 'Bilgisayar veya Server Adı' administrator "Please contact help desk immediately!"
Win server 2003 ve xp için message
net send 'Bilgisayar veya Server Adı' "Icewarp" kopyalama tamamlandi
Ekrana Mesaj yazar.
--------------------------------------------------------
XCOPY
Copies files and directory trees.
XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
[/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
[/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B]
[/EXCLUDE:file1[+file2][+file3]...]
source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies only files with the archive attribute set,
doesn't change the attribute.
/M Copies only files with the archive attribute set,
turns off the archive attribute.
/D:m-d-y Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string
should be in a separate line in the files. When any of the
strings match any part of the absolute path of the file to be
copied, that file will be excluded from being copied. For
example, specifying a string like \obj\ or .obj will exclude
all files underneath the directory obj or all files with the
.obj extension respectively.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/V Verifies the size of each new file.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/G Allows the copying of encrypted files to destination that does
not support encryption.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Copies only files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attribute
/N Copies using the generated short names.
/O Copies file ownership and ACL information.
/X Copies file audit settings (implies /O).
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
/-Y Causes prompting to confirm you want to overwrite an
existing destination file.
/Z Copies networked files in restartable mode.
/B Copies the Symbolic Link itself versus the target of the link.
/J Copies using unbuffered I/O. Recommended for very large files.
The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.
Kaydol:
Kayıtlar (Atom)