I Ty możesz wspomóc rozwój serwisu dzięki dobrowolnej dotacji za pośrednictwem PayPal!
Kliknij w poniższą grafikę, aby pomóc. Dziękuję!
Informacja zostanie zamknięta za sekund(y).
Wyrażenia regularne wpisuje się w formie separator{wyrażenie}separator, np. /^([a-z]*)$/i lub @^(?:http://)?([^/]+)@i. Stosować można wszelkie formy zgodne z funkcjami sprawdzającymi poprawność wyrażeń regularnych w PHP (przykład).
Dzieje się tak dlatego, że wpisywanie wzorca z uwzględnieniem separatorów pozwala na dodanie modyfikatorów do niego. W wypadku ich braku skrypt domyślnie doda / na początku wyrażenia i / na jego końcu.
Generalnie to użytkownik wyznacza jaką treść i pod jakim kątem chce testować. Musi on jednak posiadać pełne prawa do publikacji testowanej treści, gdyż będzie ona dostępna dla innych internautów. Należy także unikać wpisywania zwrotów obscenicznych, wulgarnych, czy wskazujących zasoby niezgodne z polskim prawem. Użytkownik ponosi pełną odpowiedzialność za treści publikowane przez niego w serwisie. Na uzasadnioną prośbę osób trzecich poszczególne wpisy mogą zostać usunięte z serwisu.
Wyrażeniami regularnymi nazywami wzorce opisujące ciąg znaków.
W sieci znajduje się całe morze przykładowych wyrażeń. Warto zainteresować się przykładowo:
Zauważone błędy proszę zgłaszać w komentarzach pod tym artykułem.
Tak. Przy każdym sprawdzonym wzorcu, w kolumnie identyfikatora, znajduje się odnośnik do strony testowanego wyrażenia. Wystarczy skopiować odnośnik i podzielić się nim ze znajomymi.
Osoby chętne do pomocy mogą jej udzielić w następujący sposób:
Zmień język na polski.
Zmień język na angielski.
Pokaż/ukryj listę ostatnich testów.
Pokaż listę tylko moich testów.
Pokaż listę wszystkich testów.
Wyświetl zawartość kanału RSS.
Pokaż pomoc.
ID | Wyrażenie regularne | Ciąg znaków | Wynik | Zwracane ciągi znaków | Link |
---|---|---|---|---|---|
528471 | r"\d\d\d\d" | Tutaj możesz znlaeżc ważne ifnoramcje na teamat ciekawych spraw 5467 takie rozne informacje 6678 |
fałsz | Link | |
528470 | [a-z] | Łukasz |
fałsz | Link | |
528469 | ^\p{Lu}\p{Ll}+$ | Łukasz |
fałsz | Link | |
528468 | ^\p{Lu}\p{Ll}+$ | Bożydar |
fałsz | Link | |
528467 | ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ | [email protected] [email protected] [email protected] [email protected] [email protected] missingatdomain.com @missingusername.com invalid_email@invalid_domain spaces are not [email protected] [email protected] [email protected] [email protected] domain@with_space .com domain@with space.com [email protected] [email protected] example@invalid-domain- [email protected] example@[123.123.123.123] [email protected] [email protected] [email protected] example@com example@com. example@[IPv6:2001:db8::1] [email protected] example@[123.123.123.123] example@[123.123.123.123.123] [email protected] [email protected] [email protected] [email protected] [email protected]. [email protected]. [email protected].. [email protected] [email protected]. [email protected] [email protected]. [email protected] [email protected]. example@[123.123.123.123]123 example@[123.123.123.123].123 example@[123.123.123.123]123. example@[123.123.123.123].123. [email protected] [email protected] [email protected] [email protected] [email protected]. [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]. [email protected]. [email protected]. [email protected]. [email protected]. [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected].. [email protected].. [email protected].. [email protected].. [email protected].. [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... [email protected]... |
fałsz | Link | |
528466 | ^240([\x21-\x22\x26-\x2F\x30-\x39\x3A-\x3F\x41-\x5A\x5F\x61-\x7A]{0,40})(#|$) | ^240([x21-x22x26-x2Fx30-x39x3A-x3Fx41-x5Ax5Fx61-x7A]{0,40})(#|$) | fałsz | Link | |
528465 | ^[A-Z]* | KONRAD | prawda |
|
Link |
528464 | ^[A-Z] | KONRAD | prawda |
|
Link |
528463 | [A-Z] | KONRAD | fałsz | Link | |
528462 | eryku | daj zadanie | fałsz | Link | |
528461 | const date = new Date() const day = (date.getDate() < 10) ? '0' + parseInt(date.getDate() + 1) : date.getDate() const month = (date.getMonth() < 10) ? '0' + parseInt(date.getMonth() + 1) : date.getMonth() const year = date.getFullYear() const dayWeek = parseInt(date.getDay()) const week = ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'] const hour = date.getHours() const minute = (date.getMinutes() < 10) ? '0' + parseInt(date.getMinutes()) : date.getMinutes() | <div className="App"> <h1>Dzisiaj jest {week[dayWeekk]},<br/></h1> <h2>{dayy}.{monthh}.{yearr}</h2> <h3>godz. {hourr}:{minutee}</h3> </div> |
fałsz | Link | |
528460 | \b^PAL[0-9]{6}$\b|\b^[0-9]{18}$\b | 059076090000000804 | prawda |
|
Link |
528459 | \b^PAL[0-9]{6}$\b|\b^[0-9]{18}$\b | PAL989867 | prawda |
|
Link |
528458 | \b^PAL[0-9]{6}$\b|\b^[0-9]{18}$\b | DFS | fałsz | Link | |
528457 | \\S | 1 x1 xYKYżo 5x16RM | fałsz | Link | |
528456 | \\S+$ | 1 x1 xYKYżo 5x16RM | fałsz | Link | |
528455 | ^[0-9]{1,3}$|^1000$ | 2 | prawda |
|
Link |
528454 | ^5_([0-9]+)_import | 5_15_import_update_products.php | prawda |
|
Link |
528453 | ^5_([0-9]+)_import | 5_1_import_update_products.php | prawda |
|
Link |
528452 | fupa | f1 u2 p3 a4 | fałsz | Link | |
528451 | using System; namespace Program { public class MainClass { public static void Main(string[] args) { Figura figura; Console.WriteLine("Wybierz figurę"); Console.WriteLine("1 - kwadrat"); Console.WriteLine("2 - trojkat"); Console.WriteLine("3 - prostokat"); int wybor1 = int.Parse(Console.ReadLine()); if (wybor1 == 1) { Console.WriteLine("Podaj a"); int a = int.Parse(Console.ReadLine()); figura = new Kwadrat(a); } else if (wybor1 == 2) { Console.WriteLine("Podaj a"); int a = int.Parse(Console.ReadLine()); Console.WriteLine("Podaj b"); int b = int.Parse(Console.ReadLine()); figura = new Trojkat(a, b); } else if (wybor1 == 3) { Console.WriteLine("Podaj a"); int a = int.Parse(Console.ReadLine()); Console.WriteLine("Podaj b"); int b = int.Parse(Console.ReadLine()); figura = new Prostokat(a, b); } else { Console.WriteLine("Niepoprawny wybór"); return; } Console.WriteLine("Wybierz działanie"); Console.WriteLine("1 - Pole"); Console.WriteLine("2 - Obwod"); int wybor2 = int.Parse(Console.ReadLine()); switch (wybor2) { case 1: Console.WriteLine($"Pole: {figura.Pole()}"); break; case 2: Console.WriteLine($"Obwod: {figura.Obwod()}"); break; default: Console.WriteLine("Niepoprawny wybór"); break; } } } abstract public class Figura { protected double a, b; public Figura(double a) { this.a = a; } public Figura(double a, double b) { this.a = a; this.b = b; } abstract public double Pole(); abstract public double Obwod(); } public class Kwadrat : Figura { public Kwadrat(double a) : base(a) { } override public double Pole() { return a * a; } override public double Obwod() { return 4 * a; } } public class Trojkat : Figura { public Trojkat(double a, double b) : base(a, b) { } override public double Pole() { return 0.5 * a * b; } override public double Obwod() { return 3 * a; } } public class Prostokat : Figura { public Prostokat(double a, double b) : base(a, b) { } override public double Pole() { return a * b; } override public double Obwod() { return 2 * a + 2 * b; } } } | using System; namespace Program { public class MainClass { public static void Main(string[] args) { Figura figura; Console.WriteLine("Wybierz figurę"); Console.WriteLine("1 - kwadrat"); Console.WriteLine("2 - trojkat"); Console.WriteLine("3 - prostokat"); int wybor1 = int.Parse(Console.ReadLine()); if (wybor1 == 1) { Console.WriteLine("Podaj a"); int a = int.Parse(Console.ReadLine()); figura = new Kwadrat(a); } else if (wybor1 == 2) { Console.WriteLine("Podaj a"); int a = int.Parse(Console.ReadLine()); Console.WriteLine("Podaj b"); int b = int.Parse(Console.ReadLine()); figura = new Trojkat(a, b); } else if (wybor1 == 3) { Console.WriteLine("Podaj a"); int a = int.Parse(Console.ReadLine()); Console.WriteLine("Podaj b"); int b = int.Parse(Console.ReadLine()); figura = new Prostokat(a, b); } else { Console.WriteLine("Niepoprawny wybór"); return; } Console.WriteLine("Wybierz działanie"); Console.WriteLine("1 - Pole"); Console.WriteLine("2 - Obwod"); int wybor2 = int.Parse(Console.ReadLine()); switch (wybor2) { case 1: Console.WriteLine($"Pole: {figura.Pole()}"); break; case 2: Console.WriteLine($"Obwod: {figura.Obwod()}"); break; default: Console.WriteLine("Niepoprawny wybór"); break; } } } abstract public class Figura { protected double a, b; public Figura(double a) { this.a = a; } public Figura(double a, double b) { this.a = a; this.b = b; } abstract public double Pole(); abstract public double Obwod(); } public class Kwadrat : Figura { public Kwadrat(double a) : base(a) { } override public double Pole() { return a * a; } override public double Obwod() { return 4 * a; } } public class Trojkat : Figura { public Trojkat(double a, double b) : base(a, b) { } override public double Pole() { return 0.5 * a * b; } override public double Obwod() { return 3 * a; } } public class Prostokat : Figura { public Prostokat(double a, double b) : base(a, b) { } override public double Pole() { return a * b; } override public double Obwod() { return 2 * a + 2 * b; } } } |
fałsz | Link | |
528450 | [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} | [email protected] [email protected] , [email protected] |
prawda | Link | |
528449 | 0 0 10,15 * * ? | 0 0 10,15 * * ? | prawda |
|
Link |
528448 | 80185903655000[0-9]{8}$ | 80185903655000574869622 | fałsz | Link | |
528447 | 80185903655000[0-9]{8}$ | 801859036550005748696 | fałsz | Link |