Skip to main content

Hi, I am using the RegxAttributeSplitter. My delimiter has to be digits followed by a whitespace. I have used the positive lookahead Regex (?=\\d(\\s)) but instead of splitting the string and keeping the delimiter in the first list, the delimiter moves into the second list. I need my delimiter to remain within the first list, I thought the answer would be to use Regex negative lookahead (?!\\d(\\s)) but the negative lookahead stalls the transformer completely and produces no result. Any clues what Regex I should be using? I have also tried using Regex in the StringReplacer but no positive results here either. Below is sample of the string..

 

H02.CCU066 Sluice (Shared 2,Rooms)

 

H02.THD067 Treatment Area - 14,Spaces

 

Yellow highlight is the delimiter moving to the second listFME Regex issue

I'm not familiar with the RegxAttributeSplitter

 

I'd use something like the following to match groups in the StringSearcher

(r\w\d]*\.>\w\d]*)\s(.*)

So first group matches letters or numbers followed by a dot followed by letters or numbers. Second group matches everything else after a space.

 

Make sure to set thesubexpresion list name under advanced and then rename list{0}.part to Room Number and list{1].part to Name


I'm not familiar with the RegxAttributeSplitter

 

I'd use something like the following to match groups in the StringSearcher

(r\w\d]*\.>\w\d]*)\s(.*)

So first group matches letters or numbers followed by a dot followed by letters or numbers. Second group matches everything else after a space.

 

Make sure to set thesubexpresion list name under advanced and then rename list{0}.part to Room Number and list{1].part to Name

Thank you @ebygomm​  this worked and got the desired results. 


Reply