Forum Discussion
leopoldvili_1
Helper I
3 years agoHow to extract letters and digits in string in Power Query
Hi,
I would like to extract text from the input string and get the result provided in the output by using Power Query.
input:
hello bd AD-001234 hb
this is AD-3245
output:
AD-001234
AD-3245
Can anyone give me some tips? not using R?
Thank you
Create a Custom Column with this code
List.Select(Text.Split([input]," "), each Text.Contains( _ , "-")){0}regards
Phil
4 Replies
- PhilipTreacy
Super User
Create a Custom Column with this code
List.Select(Text.Split([input]," "), each Text.Contains( _ , "-")){0}regards
Phil
- Earl40
Helper I
Any way to add an if statement where if another column has a certain value then apply the extraction
- leopoldvili_1
Helper I
Thank you! PhilipTreacy it works!
- Ashish_Mathur
Super User
Hi,
What is basis of extraction? Everthing from AD till the next space? Please clarify.