Announcement

Collapse
No announcement yet.

converting input to text without numbers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • converting input to text without numbers

    Hi all,

    I searched the manual for a way to keep or convert a text input to the same input but without numbers,

    Example : Input = "Element-Level1-Ep3" the result i need is "Element-Level-Ep"

    Its not for text inputs only, i want to use the same function for other things.

    Like if i want to get the name of an object and apply it to a Lable but without numbers in the object name.

    Example : Object Name is "Button-Level5-Ep8" , the string will be "Button-Level-Ep"

    Code:
    B_Prop = Button.GetProperties(this);
    B_Name = B_Prop.ObjectName
    
    NewName = Code that converts (B_Prop.ObjectName) without numbers
    Label.SetText("Label1", NewName);
    Thanks

  • #2
    Code:
    Text = string.gsub(Input.GetText("Input1"),"%d","")
    Dialog.Message("Notice", Text, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    Code:
    Text = Input.GetText("Input1")
    Text = String.Replace(Text, "3", "", false);
    Dialog.Message("Information", Text, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

    Comment


    • #3
      Thank you So much herrin

      Code:
       Text = string.gsub(Input.GetText("Input1"),"%d","")
      This was the missing piece it works like a charm.

      Comment

      Working...
      X