Community

Extract part of the file name Answered

Hi,

Suppose i have a field value as email of a person; for eg. 123@xyz.com . I want to extract 123 ie characters before @ and export it. Help appreciated.

 

Was this article helpful?

0 out of 0 found this helpful

Comments

6 comments

  • Avatar
    Permanently deleted user

    Hi,

    Follow the path from project setup station : Document Definition > Document Structure > Field > Property > Rules > New Rule and write your scripts in there.

    0
  • Avatar
    Samir Waikar

    Please provide me the script as i need it.

    Thanks,

    0
  • Avatar
    Permanently deleted user

    Is this what you are looking for?

    if(someString.Contains("@")){

       string resultString = somestring.SubString(0,test.IndexOf("@")-1)

    }

    0
  • Avatar
    Samir Waikar

    Yes, can you please given me proper script. field name is "ContactName"  and need either vbscript or .net script, so that it will return string before "@ "characters as stated above,

    0
  • Avatar
    Permanently deleted user

    string someString = Context.Field("InputField").Text;

    if(someString.Contains("@")){

       string resultString = somestring.SubString(0,test.IndexOf("@")-1)

    }

    Context.Field("OutputField").Text = resultString;

    Please consider contacting ABBYY Professional services,  as this is not the forum to learn programming.

    0
  • Avatar
    Samir Waikar

    Thanks, got it

    0

Please sign in to leave a comment.