Hi @bensat2 ,
If you have spaces at beginning and End of the string/input you can just use Trim Text Action directly as shown in below image 1:
Image 1:

If you want to remove spaces in between the text and start and end of text/input/string you can use the VBScript as shown in below image.
Please find the solution.

Code:
SET UserInput TO $'''IN_AB_ package_ 1123'''
@@copilotGeneratedAction: 'False'
Scripting.RunVBScript.RunVBScript VBScriptCode: $'''Dim str
str = \"%UserInput%\"
Set re = New RegExp
re.Pattern = \"\\s+\"
re.Global = True
str = Trim(re.Replace(str, \"\"))
WScript.Echo str''' ScriptOutput=> VBScriptOutput ScriptError=> ScriptError
(Note:- if you got your solution you can mark as solution and gives kudos)
Thanks & Regards
Vishnu Reddy