PHP、Python 相关正则函数一点实例
当我们在做字符串处理时,如果字符串处理函数不能实现我们想要的时,我们就借助正则来帮助我们实现了。
一般使用正则的情况有:匹配、查找、分割、查找并替换,下面我们就将这几种情况分别用PHP和Python语言来实现,并做一下对比。
PHP正则采用:PCRE风格。
#1 匹配Math(并获取出结果)(注意这里是要获取出匹配结果的,与不获取结果有所不同)
Python:
#coding:utf-8 import re strs = '我爱P你y你t知h吗o?n哈哈fe哈' patt = re.compile(r'^.*?(\w+).*?$',re.I) print patt.match(strs).group(1) #输出 P
说明match的作用是一个匹配的过程,不是查找。这个方法并不是完全匹配,想要完全匹配,可以在表达式末尾加上边界匹配符'$'。
php $strs = '我爱P你y你t知h吗o?n哈哈fe哈'; preg_match('/^.*?(\w+).*?$/i',$strs,$m); var_dump($m[1]);
#输出:string 'P' (length=1)
说明:preg_match()与python中的match一样,在第一次匹配后 将会停止搜索。而preg_match_all()不同于此, 它会一直搜索subject 直到到达结尾。
实际上,在PHP中正则表达式还可以这样:
preg_match('/(\w+)/',$strs,$m);
#2 搜索查找Search
Python:
patt = re.compile(r'(\w+)',re.I) print patt.search(strs).group(1) #输出 P
说明search方法一样,若查找到了就立即返回,否则一直搜索到字符串末尾,在PHP中可以使用preg_match(_all) 来实现。
PHP:
同上
#3 匹配分割
Python:
patt = re.compile(r'\w+',re.I) for i in patt.split(strs): #注意这里要使用unicode对象输出 print unicode(i,'utf-8') #以上输出 ''' 我爱 你 你 知 吗 ? 哈哈 哈'''
在PHP中可以使用preg_split()来实现
PHP:
php $strs = '我爱P你y你t知h吗o?n哈哈fe哈'; $m = preg_split('/\w+/i',$strs); var_dump($m);
/**输出:
<b style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">array</span></b> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 0 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'我爱'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=6)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 1 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'你'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=3)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 2 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'你'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=3)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 3 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'知'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=3)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 4 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'吗'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=3)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 5 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'?'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=3)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 6 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'哈哈'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=6)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 7 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'哈'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=3)</span></i>
**/
#4 搜索查找所有结果(ALL)
Python:
print patt.findall(strs) #输出 ['P', 'y', 't', 'h', 'o', 'n', 'fe']
在PHP中可使用preg_match_all() 来实现
PHP:
php $strs = '我爱P你y你t知h吗o?n哈哈fe哈'; preg_match_all('/(\w+)/i',$strs,$m); var_dump($m);
/**
<b style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">array</span></b> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 0 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><b style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">array</span></b> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 0 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'P'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 1 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'y'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 2 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'t'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 3 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'h'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 4 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'o'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 5 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'n'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 6 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'fe'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=2)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 1 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><b style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">array</span></b> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 0 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'P'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 1 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'y'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 2 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'t'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 3 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'h'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 4 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'o'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 5 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'n'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=1)</span></i> <span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> 6 </span><span class="com" style="color: rgb(136, 0, 0);">=></span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'fe'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=2)</span></i>
**/
#5 查找替换
实际上finditer()方法在python中不是查找替换,它仅是返回一个顺序访问每一个匹配结果(Match对象)的迭代器
python:
for i in patt.finditer(strs): print i.group() #以上输出 ''' P y t h o n fe '''
这和PHP中的preg_filter()有所不同,preg_filter()与preg_replace()都是执行一个正则表达式的搜索和替换。在python中正则方法中,用于查找替换的是:sub()与subn()。需要注意的是sub()返回的一个新字符串,不是作用在原对象上。
subn()返回的是一个以“新字符串和替换的次数”组成的元组,也没有作用到原对象上。
#替换三次 print patt.sub('99',strs,3) #输出 '我爱99你99你99知h吗o?n哈哈fe哈'
print patt.subn('99',strs) #输出:是一个元组('我爱99你99你99知99吗99?99哈哈99哈',7)
替换与引用
#这里批量替换文章中的图片的路径(old_c 是文章的内容)
img_dir = 'test'
img_patt = re.compile('src=".*?/(\w+\.\w+)"')
new_c = img_patt.sub(r'src="./%s/\1"'%img_dir,old_c)
PHP:
#这里批量替换文章中的图片的路径(old_c 是文章的内容)
img_dir = 'test' img_patt = re.compile('src=".*?/(\w+\.\w+)"') new_c = img_patt.sub(r'src="./%s/\1"'%img_dir,old_c)
#输出:
<span class="com" style="color: rgb(136, 0, 0);">string</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><span class="com" style="color: rgb(136, 0, 0);">'我爱999你999你999知999吗999?999哈哈999哈'</span><span class="com" style="line-height: 25px; color: rgb(136, 0, 0);"> </span><i style="line-height: 25px;"><span class="com" style="color: rgb(136, 0, 0);">(length=51)</span></i>
另注 1 对于正则的基础知识可以GOOGLE一下,Python正则的基础知识也可以GOOGLE一下。
2 对于更多关于PHP PCRE风格的正则基础,可以参看:http://cn2.php.net/manual/zh/regexp.introduction.php
3 另外有一点需要注意的是:对于处理字符串能用字符串函数处理的就用函数处理,千万别用正则。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The message "Your organization has asked you to change your PIN" will appear on the login screen. This happens when the PIN expiration limit is reached on a computer using organization-based account settings, where they have control over personal devices. However, if you set up Windows using a personal account, the error message should ideally not appear. Although this is not always the case. Most users who encounter errors report using their personal accounts. Why does my organization ask me to change my PIN on Windows 11? It's possible that your account is associated with an organization, and your primary approach should be to verify this. Contacting your domain administrator can help! Additionally, misconfigured local policy settings or incorrect registry keys can cause errors. Right now

Windows 11 brings fresh and elegant design to the forefront; the modern interface allows you to personalize and change the finest details, such as window borders. In this guide, we'll discuss step-by-step instructions to help you create an environment that reflects your style in the Windows operating system. How to change window border settings? Press + to open the Settings app. WindowsI go to Personalization and click Color Settings. Color Change Window Borders Settings Window 11" Width="643" Height="500" > Find the Show accent color on title bar and window borders option, and toggle the switch next to it. To display accent colors on the Start menu and taskbar To display the theme color on the Start menu and taskbar, turn on Show theme on the Start menu and taskbar

By default, the title bar color on Windows 11 depends on the dark/light theme you choose. However, you can change it to any color you want. In this guide, we'll discuss step-by-step instructions for three ways to change it and personalize your desktop experience to make it visually appealing. Is it possible to change the title bar color of active and inactive windows? Yes, you can change the title bar color of active windows using the Settings app, or you can change the title bar color of inactive windows using Registry Editor. To learn these steps, go to the next section. How to change title bar color in Windows 11? 1. Using the Settings app press + to open the settings window. WindowsI go to "Personalization" and then

Do you see "A problem occurred" along with the "OOBELANGUAGE" statement on the Windows Installer page? The installation of Windows sometimes stops due to such errors. OOBE means out-of-the-box experience. As the error message indicates, this is an issue related to OOBE language selection. There is nothing to worry about, you can solve this problem with nifty registry editing from the OOBE screen itself. Quick Fix – 1. Click the “Retry” button at the bottom of the OOBE app. This will continue the process without further hiccups. 2. Use the power button to force shut down the system. After the system restarts, OOBE should continue. 3. Disconnect the system from the Internet. Complete all aspects of OOBE in offline mode

Taskbar thumbnails can be fun, but they can also be distracting or annoying. Considering how often you hover over this area, you may have inadvertently closed important windows a few times. Another disadvantage is that it uses more system resources, so if you've been looking for a way to be more resource efficient, we'll show you how to disable it. However, if your hardware specs can handle it and you like the preview, you can enable it. How to enable taskbar thumbnail preview in Windows 11? 1. Using the Settings app tap the key and click Settings. Windows click System and select About. Click Advanced system settings. Navigate to the Advanced tab and select Settings under Performance. Select "Visual Effects"

We all have different preferences when it comes to display scaling on Windows 11. Some people like big icons, some like small icons. However, we all agree that having the right scaling is important. Poor font scaling or over-scaling of images can be a real productivity killer when working, so you need to know how to customize it to get the most out of your system's capabilities. Advantages of Custom Zoom: This is a useful feature for people who have difficulty reading text on the screen. It helps you see more on the screen at one time. You can create custom extension profiles that apply only to certain monitors and applications. Can help improve the performance of low-end hardware. It gives you more control over what's on your screen. How to use Windows 11

Screen brightness is an integral part of using modern computing devices, especially when you look at the screen for long periods of time. It helps you reduce eye strain, improve legibility, and view content easily and efficiently. However, depending on your settings, it can sometimes be difficult to manage brightness, especially on Windows 11 with the new UI changes. If you're having trouble adjusting brightness, here are all the ways to manage brightness on Windows 11. How to Change Brightness on Windows 11 [10 Ways Explained] Single monitor users can use the following methods to adjust brightness on Windows 11. This includes desktop systems using a single monitor as well as laptops. let's start. Method 1: Use the Action Center The Action Center is accessible

In iOS 17, Apple introduced several new privacy and security features to its mobile operating system, one of which is the ability to require two-step authentication for private browsing tabs in Safari. Here's how it works and how to turn it off. On an iPhone or iPad running iOS 17 or iPadOS 17, Apple's browser now requires Face ID/Touch ID authentication or a passcode if you have any Private Browsing tab open in Safari and then exit the session or app to access them again. In other words, if someone gets their hands on your iPhone or iPad while it's unlocked, they still won't be able to view your privacy without knowing your passcode
