We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.
Our Support systems migrated on Saturday, May 21. We'll automatically forward you to the new location for this content.

Using StrFindI syntax - Unwanted matches

Comments

3 comments

  • Avatar
    Infogix Support
    Originally posted by: stonysmith

    One easy way to search the righthand 3 characters is to use the right() function.

    positionTitle.right(3).strFindI("GM ") == -1
    For a more complicated, more capable search function, you could use Regular Expressions, but those can get very confusing fast.

    This will find any of the letters GM
    positionTitle.regexIsMatchI(".*GM*")
    Where this will find it only on the end of the string
    positionTitle.regexIsMatchI(".*GM")
    Regex expressions can get extremely sophisticated, but they're very terse, and therefore can be quite tough to read.
    For a full set of Regex documentation, consult www.pcre.org
    0
    Comment actions Permalink
  • Avatar
    Infogix Support
    Originally posted by: gmullin

    Just to add one more suggestion to Stony's regex examples this:

    positionTitle.regexIsMatchI(" GM")
    Should work for what you need. Basically anywhere with " GM" in the string (GM must be preceded by a white space) regardless of upper or lower case. If you want to look for only upper case GM then use regexIsMatch().
    0
    Comment actions Permalink
  • Avatar
    Infogix Support
    Originally posted by: I'mNewHere

    Thank you very much!

    I had been trying to figure out the syntax for left and right, but I had been trying to nest it with parentheses as you would in excel.

    RegismatchI is new, I'll have something new to learn about.

    I appreciate the help, thanks folks!
    0
    Comment actions Permalink

Please sign in to leave a comment.