Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by ovedpo15 (Sexton)
on May 15, 2018 at 11:09 UTC ( #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 (Canon) 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
Node Status?
node history
Node Type: note [id://1214543]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-11-14 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (163 votes). Check out past polls.

    Notices?