Hi Ed! I agree with your comments on webusers. Rant On!

However, I don't see a webuser entering in config information in a script to modify say a squid config file or a squidGuard config file which is unforgiving to say the least. I would love to be able to have the time to write a script to do just that. If I want to allow modifications to a system configuration file then I have to abide by the configuration rules of the application/service I am changing.

For me to see a "smtwhfa" in a posting I immediately think about a script to control a configuration file. I could never see asking "any" user to come up with those abreviations for the weekdays. Having been around systems for a while the above mentioned letters are very familiar. I am sure the OP has considered allowing a user to enter things such as Monday, Tuesday, Wednesday etc. then converting it to m,t,w, or even mtw... But I am not going to assume that his request is for a web application.

If I am going to update a config file that has the ability to accept "smtwhfa" (or whatever the last letter may be) I have to write the program to be able to accept that and maybe s-f, or Mon-Fri, or (Monday, Wednesday-Saturday), etc, etc, etc. This list of and combination of could go on forever.

I am not too sure that this posting is for a web application for any "user" to be disturbed by the output as much as it is for an incredible regex problem that a lot of people (including myself) have encountered. As for rules to make sure that a user enters in information that you can easily process I don't see that as all bad. I use rules more for myself than I do the user. Many times I have been shocked as an end user entered something into an online form that without some sort of rules resulted in catastrophe. Rules can be a good thing as it allows us not to get caught with our pants down. You can't under estimate the user..


In reply to Re: Re: Regex (lookahead) Confusion by diakonos
in thread Regex (lookahead) Confusion by ChrisR

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.