Function List for all lines that DONT have a character

Function List for all lines that DONT have a character

4
NewbieNewbie
4

    Jan 18, 2005#1

    Hi!

    I'm creating a simple wordfile section for CSS files. I want the function list to show any line that starts with a "." AND any lines that are not blank and DO NOT contain a colon.

    I got the "." part, using
    /Function String = "%.*"

    but can't figure out the DOES NOT have a ":" part :? . Any ideas appreciated.

    Thanx,
    Nathan

    6,683583
    Grand MasterGrand Master
    6,683583

      Jan 19, 2005#2

      Try this: %.[~:^r^n]+$
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Jan 19, 2005#3

        Thanks for the quick response.

        I modified my codes to this:
        /Function String = "%.*"
        /Function String 1 = "%[~:{}]+$"


        I took the period out of the 2nd string since the lines I want are those that start with a period - w/or w/out colons and those without colons - whether they start with a period or not. I added the curly brackets to the NOT list.

        This mostly works except for 2 things that show in the Function List that I DO NOT want:
        :arrow: If the line is blank, it shows in the Function list. This would need a test for at least one char on the line
        :arrow: If the line is a comment - noted by /* */ as Block Comment tags - it shows

        To resolve item 2, I think a test to see that the first char on the line is ALPHA like [a-zA-Z] would work. My problem is that I'm not sure how to incorporate this test AND a test for at least one non blank in the above expressions.

        Thanks,
        Nathan

          Jan 19, 2005#4

          I played around with this a little and these seem to work pretty well for my purposes :D:

          /Function String = "%.*"
          /Function String 1 = "%[a-zA-Z]+[~:{}]+$"


          Nathan
          A day without sunshine is like...night

          58
          Advanced UserAdvanced User
          58

            Jan 20, 2005#5

            For what it's worth, here is my (admittedly quite complex) function string for CSS files. It works on any css file I come across.

            Code: Select all

            /Function String = "%[#.]++[ ^t]++^([a-z,A-Z,0-9>^-:_.^[^]*#=" ]+^)[^t ]++[^p]++[ ^t]++{"

            4
            NewbieNewbie
            4

              Jan 20, 2005#6

              Thanks Manni.

              Even though just looking at the string gave me a headache, it IS very effective and caught some of my styles that my strings missed. Very impressive.

              I just have to go over your string to see what part does what.

              Appreciate your help,
              Nathan
              A day without sunshine is like...night

              58
              Advanced UserAdvanced User
              58

                Jan 20, 2005#7

                No problem, Nathan.

                Just don't think that I understand this beast. I spent one evening coming up with it a couple of month ago and I'm happy that he has kept on working since then. Should it ever need a change, I'm afraid I would have to start from scratch :-(


                Manni