Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: check if string is valid with special cases

by ovedpo15 (Pilgrim)
on May 15, 2018 at 11:09 UTC ( [id://1214543]=note: print w/replies, xml ) Need Help??


in reply to Re^3: check if string is valid with special cases
in thread check if string is valid with special cases

Ok I understand, forget about commas in the substrings.
your regex is good and its what I need except it doesn't handle an empty space case: "a,b,c, d,e" (bad case).
how can I add it to the regex?
  • Comment on Re^4: check if string is valid with special cases

Replies are listed 'Best First'.
Re^5: check if string is valid with special cases
by haukex (Archbishop) on May 15, 2018 at 11:17 UTC

    Again, more examples please. Only literal spaces? I am guessing you mean one or more spaces? What about other whitespace? Is " x ,..." valid? Is " x y ,..."? What is the expected output for those cases? And so on.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found