小编Myj*_*jab的帖子

Apache安装; libpcre错误

在Ubuntu 11.10上安装Apache时,出现以下错误:

configure:错误:找不到APR.请阅读文档.

我按照这里的说明,然后,我得到以下错误:

configure:error:找不到libpcre的pcre-config.PCRE是必需的,可从http://pcre.org/获得

我做错了什么,如何解决?

apache pcre

45
推荐指数
3
解决办法
9万
查看次数

使用正则表达式python在字符串中多次替换数字

当我使用re.sub改变其他两个单词的字符串中的两个单词时,我得到了输出.但是,当我尝试使用数字时输出不正确

>>> import re
>>> a='this is the string i want to change'
>>> re.sub('(.*)is(.*)want(.*)','\\1%s\\2%s\\3' %('was','wanted'),a)
'this was the string i wanted to change'
>>> re.sub('(.*)is(.*)want(.*)','\\1%s\\2%s\\3' %('was','12345'),a)
'this was\x8a345 to change'
>>>
Run Code Online (Sandbox Code Playgroud)

我不知道为什么会发生这种情况你可以提前告诉我如何使用这个谢谢

python regex string

6
推荐指数
1
解决办法
161
查看次数

在python中使用正则表达式解析URL

我想获取要从URL显示的查询名称和值.例如.url='http://host:port_num/file/path/file1.html?query1=value1&query2=value2' 从中解析查询名称及其值并打印它.

python regex

2
推荐指数
1
解决办法
3893
查看次数

标签 统计

python ×2

regex ×2

apache ×1

pcre ×1

string ×1