🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Searching for an asterisk (*)

User: "Vaughn"
Altair Community Member
Updated by Vaughn

I am using classic. I know the * is a wildcard, however, I want to search for a * in my data. How can I search for it and have it not use it as a wildcard? 

[Field1] = "*" will search for everything. I want it to only find the rows that just have a * in it. Hopefully that makes sense. 

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "Lasse"
    Altair Community Member
    Accepted Answer
    Updated by Lasse

    Hello Vaughn,

    RegexIsMatch function is one option for Expression Search: RegexIsMatch([Field1];"\*")

    -Lasse

    User: "Nicholas_21406"
    Altair Employee
    Updated by Nicholas_21406

    Hi Vaughn,

    If you use a Standard Trap, asterisks are not considered special characters.  You would have to know in which column you expected to find the asterisk, though, and you would have to specify exactly what columns you wanted to capture in your matching line (note that *.sas7bdat is just the text found in the document, it is not part of the trap):

    image

     

    With a Regular Expression (Regex) trap, asterisks are considered special characters, but you could just put a backslash in front of the asterisk - in this case, you no longer need to know which column in which the asterisk is found, and you can specify, for example, that you wanted to capture the asterisk plus the dot that followed the asterisk (dot is also a special character in Regex so must also be escaped), and then the rest of the characters until the end of the word.

    image

    I'm afraid a complete description of Regular expressions in general and trapping in Monarch is beyond the scope of this post, but here are a reference:

    https://help.altair.com/monarch/current/help/desktop/Creating_a_Regex_Trap.htm

    I would suggest you to  sign up for on boarding training, which was probably included in your purchase and/or open a Support ticket - attaching any document you are working with and the model file associated with any work you have completed so far.

    User: "CPorthouse"
    Altair Employee
    Updated by CPorthouse

    You can also use the instr() function.  If the * character is in your string it will return a number greater than 0

    instr("*",[field 1])