8 Replies Latest reply: May 15, 2014 9:53 AM by Aaron _ RSS
      • * & ? wildcards
        Grant Perkins

        0

        • * & ? wildcards
          Aaron _

          ="       ??? MESSAGE: DISPLAY:*"

           

          Here is a snipet of my code where I want the filter to grab the info.  Right now all it does is grab all matching criteria up to the ast. but then grabs everthing after; in other words, doing its job.  What I need is for it to look something like this

           

          ="       ??? MESSAGE: DISPLAY:"'**'"*"

           

          Therefore, grabing fields with criteria such as

                 123 MESSAGE: DISPLAY:** TEST **

          but not

                 123 MESSAGE: DISPLAY:   TEST

           

          Hopefully, this helps explain the problem better.

           

          Thanks and I will try to use those post mentioned above.

           

          Aaron

          • * & ? wildcards
            Grant Perkins

            OK, we may need to search deep in the available tool set for this one so need to know which version of Monarch you have available to play with. Also whether standard or Pro.

             

             

            Grant

            • * & ? wildcards
              Gareth Horton

              Aaron

               

              I might be missing something, but the filter expression

               

              Instr("** TEST **",Field)

               

              seems to work for your example text.

               

              Gareth

               

              Originally posted by Aaron:

              ="       ??? MESSAGE: DISPLAY:*"

               

              Here is a snipet of my code where I want the filter to grab the info.  Right now all it does is grab all matching criteria up to the ast. but then grabs everthing after; in other words, doing its job.  What I need is for it to look something like this

               

              ="       ??? MESSAGE: DISPLAY:"'**'"*"

               

              Therefore, grabing fields with criteria such as

                     123 MESSAGE: DISPLAY:** TEST **

              but not

                     123 MESSAGE: DISPLAY:   TEST

               

              Hopefully, this helps explain the problem better.

               

              Thanks and I will try to use those post mentioned above.

               

              Aaron /b[/quote]

              • * & ? wildcards
                Grant Perkins

                Aaron,

                 

                As a generic starting point would it be possible to check the first character of the PHRASE field to determine whether to include or exclude it?

                [font="courier"]ASC(Left(,1))<65[/font][/quote]would pick everything where the first character in the field is less than ASCii 065 for example.

                 

                You may need to allow for numerics in the first char position, so

                [font="courier"]Left(,1) .In.("0","1","2","3","4","5","6","7","8","9")

                .and.

                ASC(Left(,1))<65[/font][/quote]Would be one way of getting to that.

                 

                Unless you have only a very elderly version of Monarch the above should work. Adaptations for simplicity or complexity are possible.

                 

                Grant

                • * & ? wildcards
                  Aaron _

                  Okay, I will try these methods and get back to you tom. 

                   

                  Horton --> The example text is not even close to the real thing.  Look at my code snipet to see what the data really appears to look like. EX.

                  My data may look like this:

                  234 MESSAGE:DISPLAY:**    ERRORS DETECTED   **

                  or it may appear like this:

                  456 MESSAGE:DISPLAY:      NO ERRORS DETECTED

                   

                  the latter message I do not want...

                   

                  I must also point out the way I am getting this information will not allow me to use a seperate template to trap these messages.

                   

                  Merit --> That looks like it may work...  smile.gif[/img]

                   

                  Also, I am using v8

                   

                  Finally, I have contacted Datawatch and they are looking for a work around.  The current work around I have made is to simply replace all * with $

                   

                  This solution makes my filter work flawlessly.

                   

                  So the problem is clearly a bug.(At least in my opinion)  tongue.gif[/img] 

                   

                  CHEERS

                  • * & ? wildcards
                    Grant Perkins

                    Aaron,

                     

                    It does get a little complicated with * and ? since they are the two wildcards used within Monarch and therefore need to be surrounded by rules about how to treat them under certain circumstances which are not always unambiguous.

                     

                    I'm not sure what your filter is but it is no surprise that it works if you change the character involved.

                     

                    Did you use the MSRP utility for this or simply the REPLACE function in version 8?

                     

                    Looking at you sample it appears that the lines you don't require always start with a space whereas the lines you do want always start with a character.

                     

                    If this is consistent then you can use a fairly generic filter formula.

                     

                    [font="courier"]Asc()<>32[/font][/quote]However if the first character it not always a space you would need to look at the two component or multi-component filter.

                     

                    Maybe easiest to develop sparate filters for each of the lines you want to keep and then build a compound filter, using the new functionality in V8, from the resulting individual filters?

                     

                    I am guessing that example lines may turn out to be much simpler than the full output you need to deal with.

                     

                    I hope this helps a little.

                     

                    Grant

                     

                     

                      Originally posted by Aaron:

                    Also, I am using v8

                     

                    Finally, I have contacted Datawatch and they are looking for a work around.  The current work around I have made is to simply replace all * with $

                     

                    This solution makes my filter work flawlessly.

                     

                    So the problem is clearly a bug.(At least in my opinion)    tongue.gif[/img]   

                     

                    CHEERS /b[/quote]

                    • * & ? wildcards
                      Aaron _

                      0