Extract student number using Regex

I have excel data which contains many columns, one column called Description has the following data, I want to extract student number from each row using KNIME

Example below are three different rows

Being Settlement of exam fee, student Number IMIS/C/5946/7/5/2021/5690 in respect of Flora Hamis

Being Settlement of school fee, student Number IMIS/C/28727/14/7/2022/28980 in respect of Tony Alex

Being Settlement of Life Assurance, student Number IMIS/C/28020/23/6/2022/28279 in respect of Richard Nixon

Here is my attempt

regexReplace($Description$,^IMIS/\w{1}/\d/\d/\d/\d\s? ,“$1” )

Hello @spyglass and welcome to the KNIME community

I hope I 'm not miss interpreting the challenge; despite that you think your challenge is completely described, an example of expected output is always pretty helpful.

You can test the following code in a ‘String Manipulation’ node:

regexReplace($text$, ".*(IMIS.+\\/\\d+)\\s.*", "$1")




@gonhaddock Thanks, This is what I needed

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.