in reply to Re^2: regex is not producing desired output
in thread regex is not producing desired output
I'm afraid I do not understand your problem. If I take ikegami's code and modify it slightly so as not to depend on the existence of "apache.txt":
while (<DATA>) { s/\bis\b/are/g; print; } __DATA__ Apache is a modular server. This implies that only the most basic func +tionality is included in the core server. is it so ? Extended features are available through modules which can be loaded in +to Apache. By default, a base set of modules is included in the server at compile-time. If the server is compiled to u +se dynamic ally loaded modules, then modules can be compiled separately and added at any time using the LoadModule directi +ve. Otherw ise, Apache must be recompiled to add or remove modules. Configuration directives may be included conditional o +n a presen ce of a particular module by enclosing them in an <IfModule> block.
I get the following output (where clearly "is" has been replaced by "are" throughout):
Apache are a modular server. This implies that only the most basic fun +ctionality are included in the core server. are it so ? Extended features are available through modules which can be loaded in +to Apache. By default, a base set of modules are included in the server at compile-time. If the server are compiled to +use dynami c ally loaded modules, then modules can be compiled separately and added at any time using the LoadModule directi +ve. Otherw ise, Apache must be recompiled to add or remove modules. Configuration directives may be included conditional o +n a presen ce of a particular module by enclosing them in an <IfModule> block.
How does this differ from your desired output?
HTH,
planetscape
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: regex is not producing desired output
by manishrathi (Beadle) on Jan 26, 2010 at 00:37 UTC | |
by ikegami (Patriarch) on Jan 26, 2010 at 06:07 UTC |