Forum Discussion
ovetteabejuela
8 years agoImpactful Individual
Power Query | Replacing Text Recommendation (Wildcard/RegEx)?
Hi, I have a very simple problem, so Im still working on names... full names unfortunately there are some inconsistencies that I wanted to fix. For example there's a <Last Name><comma><Fi...
- 8 years ago
Apart from combining multiple steps in 1 line, I don't see any way.
2 Alternatives:
Table.AddColumn(Source, "Custom", each Text.Combine(List.Transform(Text.Split([Name],","), Text.Trim),", ")) or Table.AddColumn(Source, "Custom", each Text.Replace(Text.Replace([Name],",",", "),", ",", "))
MarcelBeug
8 years agoCommunity Champion
Ashish_Mathur that are still 2 steps ... :smileywink:
ovetteabejuela
8 years agoImpactful Individual
Ashish_Mathur, thanks but I think that was my path already.
MarcelBeug, thanks for that atleast that's a oneliner. so with you suggesting that I'd presume PQ doesn't have anything like Regular Expressions which I think could address this gracefully. Anyway I'm happy with your suggestion aleady.
- MarcelBeug8 years agoCommunity Champion
Well, I think my first alternative is pretty graceful (M-style). :smileylol:
Anyhow, what regular expression would you have in mind?
E.g. in Word, I can't think of any way to replace "," or ", " by ", " in 1 step.