everything in the known universe about rgesit

tertulis menulis ditulis


Translation of The Holy AL-Qur'an

20 November 2007

Filed under: General

Regular Expression biasa digunakan bersamaan dengan java script sehingga berjalan di client side untuk mengecek inputan dari user sehingga hal ini dapat mengurangi beban kerja server.

Berikut ini merupakan karakter yang digunakan didalam Regular Expression :

  • general escape character with several uses
  • assert start of subject (or line, in multiline mode)
  • $ assert end of subject (or line, in multiline mode)
  • . match any character except newline (by default)
  • [ start character class definition
  • ] end character class definition
  • | start of alternative branch
  • ( start subpattern
  • ) end subpattern
  • ? extends the meaning of (, also 0 or 1 quantifier, also quantifier minimizer
  • * 0 or more quantifier
  • + 1 or more quantifier
  • { start min/max quantifier
  • } end min/max quantifier
  • general escape character
  • negate the class, but only if the first character
  • - indicates character range
  • ] terminates the character class
  • a alarm, that is, the BEL character (hex 07)
  • cx “control-x”, where x is any character
  • e escape (hex 1B)
  • f formfeed (hex 0C)
  • n newline (hex 0A)
  • r carriage return (hex 0D)
  • t tab (hex 09)
  • xhh character with hex code hh
  • ddd character with octal code ddd, or backreference
  • 40 is another way of writing a space
  • 40 is the same, provided there are fewer than 40 previous capturing subpatterns
  • 7 is always a back reference
  • 11 might be a back reference, or another way of writing a tab
  • 11 is always a tab
  • 113 is a tab followed by the character “3″
  • 113 is the character with octal code 113 (since there can be no more than 99 back references)
  • 377 is a byte consisting entirely of 1 bits
  • 81 is either a back reference, or a binary zero followed by the two characters “8″ and “1″
  • d any decimal digit
  • D any character that is not a decimal digit
  • s any whitespace character
  • S any character that is not a whitespace character
  • w any “word” character
  • W any “non-word” character
  • b word boundary
  • B not a word boundary
  • A start of subject (independent of multiline mode)
  • Z end of subject or newline at end (independent of multiline mode)
  • z end of subject(independent of multiline mode)

Contoh penggunaan Regular Expression adalah sebagai berikut :

  • untuk mengecek format email
    a-z0-9_]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,4}$
  • Untuk mengecek format url
    /http://w+.\w+.\w+/


Get Dollar And Check Your Account (Click For Join)
Free Transfer Dollars to Your HomeTown (Click For Transfer)

Comments »

Terima Kasih Atas Saran, Kritik dan Komentar Anda

No comments yet.

RSS feed for comments on this post.

| Saran | Kritik | Komentar |

Semoga Saran, Kritik dan Saran Anda Berguna Bagi Kita Semua



masukkan

 If You Haven't a Gravatar Image, Join at Gravatar OnLine

    

Your Ad Here

            Regards,


            R.Gesit Prasasti Alam


® Free Design and Templates On Your Blog :)