Skip to main content
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    How to configure the allowed characters in a user's e-mail address

    • Product: Alma


    How to add _ before @ in email?  


    The allowed characters and formats for an e-mail address are configurable:

    1. Go to Alma > Administration > User Management Configuration > Configuration Menu > Other settings

    2. Configure the email_regex parameter to add the desired characters in the desired locations.
    For example:
    (^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$)|\s* - doesn't allow "_" before the @.

    (^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z_])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$)|\s* - does allow "_" before the @.

    Note the "_" in the allowed characters before the "@".

    Additional Information

    Please see more suggestions in this article: "Field Email Address must have a valid form" when updating a user". 

    There are several online resources available to aid in constructing and testing regular expressions e.g.


    • An earlier suggestion seems not to be working (it is not in effect) any more:

    3. To change the number of segments, repeat the section between the "@" and the first '*' after the "@", including the '*'

    This suggestion causes errors if the email is added in Alma, and can't be saved in:


    • Article last edited: 14-AUG-2023