![]() |
|
"be consistent" | |
PerlMonks |
Re: Death to Dot Star!by Juerd (Abbot) |
on Jan 01, 2002 at 06:07 UTC ( #135472=note: print w/replies, xml ) | Need Help?? |
If .* is being used to grab data, or in a regex that's just there to verify if something's correct, it is bad most of the time. BUT... If s/// is used, .* often is the right choice.
Please don't use [\s\S]* or [\d\D]* etc because someone told you .* is bad. You can use .* if you know it's right. (btw, . doesn't match \n unless /s is used, [\d\D] and friends do match \n). Summary: if you know what it does, and it does what you want, .* is not bad.
In Section
Meditations
|
|