Forum Discussion

snigam's avatar
snigam
Occasional Contributor
2 years ago

User of wildcard in aqString.Replace() function

I am trying to delete the file extension from the file name string by using below code snippet. But in replace function use of a wildcard is not working. What am I missing here?

aqString.Replace(KeywordTests.Verify_Attachements.Variables.UploadedFiles.Value('FileName'),'.*','',false)

 

PS: I am trying to trim the string not dealing with an actual file.

2 Replies

  • katherine3's avatar
    katherine3
    Occasional Visitor

    As i know the Replace function in most programming languages does not support regular expressions or wildcards for pattern matching. the os.path.splitext function splits the file name into its base name and extension. By selecting the first element of the resulting tuple, you obtain the file name without the extension.

     

     

     

    targetpayandbenefits