Both you and DamnDirtyApe have a .* preceeding
the =. Why?
print $string =~ /=(.*)/
will do fine.
Abigail | [reply] [Watch: Dir/Any] [d/l] [select] |
will do fine.
But not the same. Their versions grab everything after the last =, your version grabs evertyhing after the first one.
I think your solution is better (and I'm sure it's a lot more efficient), but we can't know for sure without more information.
$\ = "\n";
for ('title=foo' ,'title=foo=bar') {
print "-> $_";
print /.*=(.*)/;
print /=(.*)/;
}
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
| [reply] [Watch: Dir/Any] [d/l] |
Their versions grab everything after the last =, your version grabs evertyhing after the first one.
Eh, no. Only *one* of their versions grabs everything after
the last, the other grabs everything after the first.
The problem however didn't specify what should happen if
there are multiple = characters present.
Abigail
| [reply] [Watch: Dir/Any] [d/l] |