Visokio website     Downloads     Video tutorials     KnowledgeBase  
Devices - Search Type - Regular Expression - Visokio Forums
Devices - Search Type - Regular Expression
  •     nevynb April 4, 2011 6:57AM
    Hi
    I have a device type called 'Supplier name' which is an ordinary text field and I've set the 'Search Type' to Regular Expression.
    So I have lots of business names in this column and for example if I use the following regex Acme|Starbucks|Tesco

    then it returns all supplier names where name contains Acme, Starbucks or Tesco. This is great as it even finds these names if in the middle of a string etc. I however also get Acme Asset Managers which I specifically want to exclude but include everything else, that being Acme anything BUT Exclude Acme Asset Managers AND include Starbucks anything AND Tesco anything.
    Does anybody know the 'Visokio' regex to exclude a particular word or string AND still pipe the other conditions together? I'm a regex newbie but the | and | and | is great when 'categories' are not an option and you don't by design want to script these exclusions into your underlying sql.
    Any help would be appreciated.
  • 3 Comments
  •     steve April 4, 2011 8:11AM
    In regex, use a zero-width negative lookahead (?!X)
    In this case: (Acme(?! Asset))|Tesco|Starbucks

    Alternatively, find the item your want to exclude in the bar view, for example; select it, and click Move.
  •     nevynb April 4, 2011 8:39AM
    Hi Steve thank you for the response but that regex gives me nothing back.

    Alternatively, is there any way to use AND / OR when using the substring option?
  •     steve April 4, 2011 9:14AM
    See attached. Did you miss the space?

    You can use Substring with "Any" word chosen, but you won't be able to exclude the asset managers case.
    Attachments
    Acme regex.iok 6K

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership