Extract certain words
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Guys,
I have a simple one (At least for a guy in the know).
I have the following data in a column (Obviously a lot more combinations)
WLINE11_0070_001
WLINE6_0050_001
Can someone help me with the code in Regex to extract only the line/plant ID:
LINE11_0070
LINE6_0050
If Regex is not the best solution to this I am happy to take advice on that as well.
Thanks in advance,
Soren
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JosefsS
Can you provide some sample input and expected output It will help us get a better understanding of the usecase.
We will be happy to help : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
if you need only numbers then you can use the formula as ToNumber([String]) like that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Not 100% sure what you mean by sample input and output over and above what I have given you in the original message.
The data source for this is Excel.
And the input cell has this information:
WLINE11_0070_001
WLINE6_0050_001
I.e. I need to trim of the "W" at the front and "_001" at the back.
The output will be part of a larger flow but I want to create a new column with the new data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Trim([Column],"W") AND RightTrim ([Column],"_001") Try this with minor modifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @JosefsS
RegEx in parse mode
W(.+)_\d+
will grab everything between a capital W and the final underscore which is followed by numbers
edit: sorry, forgot to attach the workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Guys,
Lots of good solutions here - thank you all - much appreciated!
Soren
![](/skins/images/6056C79A596CAB15526D64C598622101/responsive_peak/images/icon_anonymous_message.png)