\d checks all Unicode digits, while [0-9] is limited to these 10 characters. For example, Persian digits, ?????????, are an example of Unicode digits which are matched with \d, but not [0-9]. [0-9] isn't equivalent to \d. [0-9] matches only 0123456789 characters, while \d matches [0-9] and other digit characters, for example Eastern Arabic numerals ٠١٢٣٤٥٦٧٨٩