in reply to Question on REGEX
A large one: +? says "match the shortest set of one or more of these", (so, a+? matches "a" in "aaaaaaaa"), while * says "match 0 or more of these"; a* matches "bob".
See Quantifiers in Regular Expressions in the Tutorials section of this site, or read perldoc perlre on your system.
More generally, see How to RTFM for information about where things like this are documented on your system.
perl -e 'print "How sweet does a rose smell? "; chomp $n = <STDIN>; $r +ose = "smells sweet to degree $n"; *other_name = *rose; print "$other +_name\n"'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Question on REGEX
by kal (Hermit) on May 14, 2001 at 16:50 UTC | |
by arturo (Vicar) on May 14, 2001 at 17:01 UTC | |
by kal (Hermit) on May 14, 2001 at 19:44 UTC | |
by merlyn (Sage) on May 14, 2001 at 19:55 UTC |