in reply to wisdom needed for string matching and array processing
Given the example text you did it appears that you've got "dogs, cats, 4, 8". When you split on "," you'll have spaces at the beginning of your items, hence your anchored regex will fail (e.g. " 4" will not match /^\d+$/). You either need to allow optional spaces there or add them to your split delimiter so they're removed when you split. See perldoc perlre in either case.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: wisdom needed for string matching and array processing
by sierrastar (Sexton) on Nov 07, 2005 at 00:06 UTC |