在Ubuntu 11.10上安装Apache时,出现以下错误:
configure:错误:找不到APR.请阅读文档.
我按照这里的说明,然后,我得到以下错误:
configure:error:找不到libpcre的pcre-config.PCRE是必需的,可从http://pcre.org/获得
我做错了什么,如何解决?
当我使用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)
我不知道为什么会发生这种情况你可以提前告诉我如何使用这个谢谢
我想获取要从URL显示的查询名称和值.例如.url='http://host:port_num/file/path/file1.html?query1=value1&query2=value2'
从中解析查询名称及其值并打印它.