Better way might be to use Parse text -action to just get the number without needing to split it into a list. So you get the number with just one action when using regex that finds the number between underscore and .pdf
Text to find (regex): (?<=_)\d+(?=\.pdf) Is regular expression Toggled on
Then Match variable has the number inside it:
​​​​​​​ If you want to do this with split action: Change "Delimeter type" to be "Custom" and then add to "Custom delimeter field "_" like so:
Then you get [Split, 1.pdf]
Then you could use replace on the second item on the list which s %TextList[1]% and text to find .pdf and replace with %''% (empty string)
Use split() Function:
First, split the text by the _ delimiter, which will give you an array with two elements: "Split" and "1.pdf".
Use another split() to remove .pdf
Then split the second part "1.pdf" using the . delimiter to extract the value 1.