Skip to main content

Hi there,

the sample attribute looks like: "xxx www.mypage.com\\\\localserver.com"

Between the "xxx" (the number is variable) an the URL is a blank. So I need to find the index of the first blank and trim the attribute (string) from left to that index.

In addition I need to remove every character including an beyond "\\\\".

Any hints? I think it will work with the StringSearcher or StringReplacer...but actually I have no idea .. :-((

Thanks in advance,

Stefan

Hi,

Attributesplitter.

You can split the value based on space


You could use a regular expression in a string searcher

e.g. something like (?<=\\s).+(?=\\\\\\\\) to return everything from the first space up to \\\\


Yup, worked fine... 🙂 Thanks...

BUT - in addition - I have a similar structure on a different attribute containing names. The attribute looks like "xxx Kindergarten Sunflower".So I need to trim "xxx " an keep the rest of the attribute. With the attribute trimmer I "cut" even the portion I want to keep. So it would be perfect to just trim the first characters incl. whitespace...


Hi @stefangiese, the StringReplacer could also be used here, with these parameters.

  • Mode: Replace Regular Expression
  • Text To Replace: .+?\\s+(.+?)\\\\\\\\.+
  • Replacement Text: \\1

Hi @stefangiese, the StringReplacer could also be used here, with these parameters.

  • Mode: Replace Regular Expression
  • Text To Replace: .+?\\s+(.+?)\\\\\\\\.+
  • Replacement Text: \\1
Updated the regex to support your new request.

 

  • Text To Replace: .+?\\s+(.+?)(\\\\\\\\.*)?$

Yup, worked fine... 🙂 Thanks...

BUT - in addition - I have a similar structure on a different attribute containing names. The attribute looks like "xxx Kindergarten Sunflower".So I need to trim "xxx " an keep the rest of the attribute. With the attribute trimmer I "cut" even the portion I want to keep. So it would be perfect to just trim the first characters incl. whitespace...

This will trim from the first space onwards

 

 

 


Hi takashi,

yep, works perfect!! Thanks :-)))


Reply