コミュニティ

Script to remove whitespace and anything after

Hi!

New to scripting in Abbyy...and hoping to get some help on a script to remove white space and also remove some text from my string (anything after / including the /)

I have a table named PoDetails and a column named PartNumberDescription - this is the row where the script should apply but struggling to get this to work

Example string in row: A6695 650 20 NDF / 0

Desired outcome: A669565020NDF

Any ideas anyone?

Thanks!!

この記事は役に立ちましたか?

0人中0人がこの記事が役に立ったと言っています

コメント

3件のコメント

  • Avatar
    Permanently deleted user

    Hello,

    We recommend to use the autocorrection script for your purpose https://help.abbyy.com/en-us/flexicapture/12/developer/script_conversion

    0
  • Avatar
    HamdiMHZ

    Hello,

    Try this:

     

    string S = "A6695 650 20 NDF / 0" ; 

    string newstring = S.Replace(" " , "").Replace(/, "");

    Output => newstring = "A669565020NDF0"

     

    Regards,

     

    0
  • Avatar
    Permanently deleted user

    Hey,

    You below code to get your desired output:

    string example = "A6695 650 20 NDF / 0" ;
    example = example.Replace(" " , "");
    int index = example.IndexOf("/");
    example = example.Substring(0, index);

      output = A669565020NDF

    0

サインインしてコメントを残してください。