Skip to content

Instantly share code, notes, and snippets.

View PAPIONbit's full-sized avatar

MohammadMahdi Ghorbani PAPIONbit

View GitHub Profile
@amirasaran
amirasaran / JavaScript Arabic character to Persian
Created September 27, 2016 06:23
JavaScript Arabic character to Persian (تبدیل حروف عربی به فارسی)
String.prototype.replaceAll = function(search, replacement) {
var target = this;
return target.replace(new RegExp(search, 'g'), replacement);
};
String.prototype.toPersianCharacter = function () {
var string = this;
var obj = {
'ك' :'ک',
'دِ': 'د',
@MoienTajik
MoienTajik / iranian-phone-numbers-regex.md
Last active June 10, 2024 22:59
Regex For Iranian Mobile Phone Numbers

Regex For Iranian Phone Numbers

This regex supports all kinds of Iranian mobile phone numbers :

^(\+98|0)?9\d{9}$


Regex Visualized