168
Views
10
Comments
[Extension Text] Re : Discussion
Question
thumb-text-gif
Web icon
Forge asset by OutSystems
So the text extension is only avaiable for the 5.0 version along with the Enterprise Manager.. so where can i get the standalone version for the 4.1 version?
2017-10-02 14-22-21
Paulo Tavares
Staff
Hi Pedro.

You may download it now from the component page.

Thanks.

Best regards,

Paulo Tavares
2019-11-12 17-31-26
Justin James
 
MVP
Some notes on String_Split and the "Delimiters" parameter: it is indeed possible to have it operate on more than one delimiter! But... it is not possible to have a multi-character delimiter. In short, each character in the the "Delimiters" parameter gets used as a delimiter for the split. For example, with "Delimiters" equal to:

NewLine() + ", "

... the string will be split on a newline character, a comma, or a space. But if you have a string with a comma followed by a space (for example: "Bob, Henry") you would get an empty string as one of the outputs ("Bob", "", "Henry"). Best practice (in my experience) is when iterating over the results, to skip to the next iteration if the current value is equal to "".

J.Ja
2018-09-07 11-54-27
Eric Oud Ammerveld
Hi Justin,

Is it possible for you guys to implement a bit or regexp for that part in order to make the string split cope with a multicharacter delimiter?
E.g.
In order to split on a carriage return followed by a newline, a %, a $ or a NewLine() type
["\r\n"|"%"|"$"|NewLine()]

2019-11-12 17-31-26
Justin James
 
MVP
Eric -

I didn't write it, I just looked at the source code to figure out how it worked since I couldn't find documentation on "Delimiters". :)

That being said, for this need, you could create one that uses a regex fairly easily in Integration Studio. Maybe I'll whip one up over the next few days and add it to my suite of "Really Useful Extensions" that I need to post up here one day. I also need to post my Entity that has all of the countries in it, that was 2 hours of typing no one needs to repeat...

J.Ja
2018-09-07 11-54-27
Eric Oud Ammerveld
2 hours of typing?
You mean a data dump from one of these webservices?
https://www.webservicex.net/country.asmx
2019-11-12 17-31-26
Justin James
 
MVP
Eric -

Yup, I typed it all in myself. That Web service isn't coming up (good reason to not count on it, at least for real time...). I could have found an easier way to get it in (this was done pre-IntelliWarp), but sometimes it's easier to just do something the boring way than to waste time doing it a fancy way. In this case, I just did a ton of copy/paste while overseeing the patching of a bunch of servers. :)

J.Ja
2018-09-07 11-54-27
Eric Oud Ammerveld
Totally true; I have also typed my way through a static MimeType table. :)
Still weird that i.e. the UN or ISO / NEN don't have a central webservice repo containing this 'global' information.

I know the EU has some but they are meant for a 'once a week download only'.
UserImage.jpg
Rui Lopes

Hi,

Could you please add a function for escaping regexp metacharacters? In C#, it would be the Regex.Escape method.

Thanks,

Rui

2019-11-12 17-31-26
Justin James
 
MVP

Rui Lopes wrote:

Hi,

Could you please add a function for escaping regexp metacharacters? In C#, it would be the Regex.Escape method.

Thanks,

Rui


Since this Extension is now part of the base platform, it would be better to post this as an Idea.


J.Ja

UserImage.jpg
Rui Lopes

Hi Justin,

Right after posting my comment in this thread, I had the same thought :). Done at:

Rui

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.