Skip to main content
Cadet | Tier 2
February 16, 2024
Solved

String package: How to extract only alphabet from string

  • February 16, 2024
  • 12 replies
  • 779 views

Hi, help me! Can I extract only alphabet value from string and exclude those number value in string.

Example string: My name is Liyana 6547

I just want to display only “My name is Liyana”. The string value is random and not fix.

Best answer by Zaid Chougle

Hey @liyananadia ,

you can use String→ Replace and pass RegEx as \d+, and replace with keep as blank. You will get the output

12 replies

Shreya.Kumar
Pathfinder Community Team
February 4, 2025

@Vaandu I found a workaround to this - I tried your regex expression with “Extract All Matches” instead of “Extract a Regex Match” and it worked.

This approach gives you all matching strings in a list and you could loop through them to check the correct one for your application. Hope this helps!

 

Navigator | Tier 3
February 6, 2025

@Shreya.Kumar ,

Thank you for the insightful idea on extracting patterns!
 

I had been achieving a 100% success rate using another method, which involved applying the same regex through a VBS script. This approach allowed me to obtain highly accurate results without the need for any additional action packages. The extracted string data was then stored in an Excel file.

Your idea provided a feasible solution that significantly enhanced my process. Below is a breakdown of my VBS script and the string output:

additional thanks to ​@Tamil Arasu10