English 中文(简体)
• 如何从使用《PERL》中经常表述的扼杀中删除特定特性
原标题:How to remove a specific set of characters from a string using regular expression in PERL
  • 时间:2010-07-26 05:26:46
  •  标签:
  • mod-perl2

1)For example::I have a $string ="abc hell_+o w343r2d -000 rebotin".Using search pattern and regular expression is there any way to remove or chop -000 from the string in PERL. 2)I want to begin learning regular expression with examples in simple means.Which is the best tutorial to start with???

问题回答
$string = "foobar";
$string =~ s/bar/baz/g;

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=search+and+replace” rel=“nofollow noreferer” 研究和替代。 第一个项目是寻找,第2项是用什么来取代。

就你而言,你要求删除替代条款。 <代码>string =~ s/000/g将完全删除-000





相关问题
How can I run Devel::Cover under mod_perl2?

Unfortunately, Devel::Cover does not yet work with threads. It doesn t work with prefork either. Being use d in startup.pl, Devel::Cover issues Not a CODE reference. END failed--call queue aborted. ...

How can I learn DOCUMENT_ROOT in startup.pl under mod_perl2?

I want to learn DOCUMENT_ROOT in startup.pl, but the best I can do is to learn server_root: use Apache2::ServerUtil (); $server_root = Apache2::ServerUtil::server_root(); which is quite useless. I ...

How can I determine PerlLogHandler performance impact?

I want to create a custom Apache2 log handler, and the template that is found on the apache site is: #file:MyApache2/LogPerUser.pm #--------------------------- package MyApache2::LogPerUser; use ...

IPC::Open3 Fails Running Under Apache

I have a module that uses IPC::Open3 (or IPC::Open2, both exhibit this problem) to call an external binary (bogofilter in this case) and feed it some input via the child-input filehandle, then reads ...

Authentication Module Issues with Apache 2 and Perl

I am SharePoint Developer trying to get a Perl module to work with Subversion, but I think something is wrong with my syntax. I just need to get the username and password, pass it into the webservice,...

热门标签