Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Extracting names from string

by dimar (Curate)
on Feb 09, 2005 at 02:33 UTC ( [id://429284]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Extracting names from string
in thread Extracting names from string

A valid consideration. In fact you will notice I added the 'dot' (in addition to alphanumerics) simply because one was in the sample provided by the OP. The (simplifying) assumptions I enumerated were guesstimates.

If we *really* wanted to be precise, we'd want both a spec and input validation (to know what flavor of xSV we were dealing with here, and to ensure user-data was 'scrubbed' before ever getting into the file/database/whatever to begin with)

(for example, what happens in the alien case where you get a user who has a pipe or a slash in their name ... hmm ... isn't *slash* the name of some rock band dude ... I digress).

You should know exactly what character sequences are in your delimiter-space, and what characters are in your message-space, and the two sets should be both finite and orthogonal.

It's always a good reminder that (at least in production code) there should be none of this such 'guesswork' involved at all. ... but close enough for a tutorial on 'split'...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://429284]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found