Hi,
I am very new to knime.
I have been working a workflow and I am stuck trying to extract a number from text.
The problem is in a particular column, I have text but in front of the text is always a date written in the form dd/mm.
E.g “24/04 Testing my Knime workflow”. The date however can be written in any form in situations where the day or month is singular i.e. “3/3” or “09/3” or “9/03”.
I want to extract this number - in the case of my example “23/03” into a new column by itself.
Now I am not really interested in the string. I Just want a function that reads that column and extracts the number in front of the string into a new column.
Please can anyone offer any help as regards this?
Thank you.
using a String Manipulation Node in combination with the regexReplace function should do the job. Here is the example workflow with two approaches both using RegEx.
Thanks a lot @mwiegand, this looks like it will get the job done- for my initial question.
But I just found out of another instance of another possible format that the comments in the column could come in and I am not sure if this will fit that use.
So basically, there are some times when there will be updates to the case and that is sometimes captured in the column.
For example
the initial comment was “24/04 Testing my knime workflow”
there are instances where the comment will be “25/04 follow up on the test, 24/04 Testing my Knime workflow”
Now the date I am truly interested in is the first date that appears in the comment section i.e. in this instance the “25/04”
So my question is, is there a way to go about that in the instance where there are multiple dates in the comment?