Εργαλεία διαδικτυακού μετατροπέα XhCode

Εργαλείο επαλήθευσης τυπικής έκφρασης στο διαδίκτυο

1,Εφαρμογή διαδικτυακών προσαρμοσμένων τυπικών εκφράσεων για εξαγωγή περιεχομένου κειμένου
2,Επικυρώστε οποιαδήποτε τυπική έκφραση

Τι ακριβώς είναι μια κανονική έκφραση?

Όταν γράφετε προγράμματα ή ιστοσελίδες που επεξεργάζονται συμβολοσειρές, υπάρχει συχνά ανάγκη να βρείτε συμβολοσειρές που πληρούν ορισμένους περίπλοκους κανόνες. Οι τυπικές εκφράσεις είναι τα εργαλεία που χρησιμοποιούνται για την περιγραφή αυτών των κανόνων. Με άλλα λόγια, οι κανονικές εκφράσεις είναι κώδικας που καταγράφει κανόνες κειμένου.

Common metacharacters
Code Description
. Matches any character except newline
\w Match letters or numbers or underscores
\s Matches any whitespace
\d Matching numbers
\b Match the beginning or end of a word
^ Match the beginning of a string
$ Match end of string
Common qualifiers
Code / syntax Description
* Repeat zero or more times
+ Repeat one or more times
? Repeat zero or one time
{n} Repeat n times
{n,} Repeat n or more times
{n,m} Repeat n to m times
Common antonyms
Code / syntax Description
\W Matches any characters that are not letters, numbers, underscores, or Chinese characters
\S Matches any character that is not a space character
\D Matches any non-digit character
\B Matches where the word is not beginning or ending
[^x] Matches any character except x
[^aeiou] Matches any character except the letters aeiou