Forum Discussion

Nathan_H_'s avatar
Nathan_H_
Ideator I
5 years ago
Solved

ItemType Pattern No Space

Good day all.  Can someone tell me how to set the Pattern for an ItemType Property to not allow spaces?  I read the Tech Tip: Enforce Property Formats Using Regular Expressions and looked at the Regex link provided, but have not been able to make anything work.  

I have tried  [\s], [^\s], and [^\s-], but those throw an errors if there is not a space.  Thank you for any help that you can provide.

  • AngelaIp's avatar
    AngelaIp
    5 years ago

    Tried it by myself with ^\S*$ without additional brackets and it worked fine.

4 Replies

  • Hi Nathan,

    your end tag ($) is missing. Try something like [^\S*$]

    ---

    You liked this answer? Visit my Youtube channel!!! 

    • Nathan_H_'s avatar
      Nathan_H_
      Ideator I

      AngelaIp,

      Good day.  When I use that code it throws a fault if it does not have a white space.  I tried removing the ^, but that does nothing.

      • AngelaIp's avatar
        AngelaIp
        Ideator I

        Tried it by myself with ^\S*$ without additional brackets and it worked fine.