LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Removing Special Characters from a Field

    Employee
    Posted 03-04-2010 14:52

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mblake

    Is there a quick way to remove all special characters (like /, #, % etc) using a filter node and brainscript? I've done it before but using a series of replace functions for each character, but there must be a more eloquent way of doing it. Thank you in advance.


  • 2.  RE: Removing Special Characters from a Field

    Employee
    Posted 03-04-2010 22:04

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Try this in a filter node:

    override emit myfieldtofix = myfieldtofix.regexSubstitute("[[:punct:]]","")


  • 3.  RE: Removing Special Characters from a Field

    Employee
    Posted 03-08-2010 07:16

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mblake

    That did the trick. Thanks again!