You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by Shalitha Suranga <sh...@gmail.com> on 2018/11/14 06:42:07 UTC

Adding more useful vars to svl-core

Hi..

How about adding these vars.What do you think?

$ST{arg, start [,end] } - Sub string of a string. will be useful when
dealing with fixed length things like getting fixed extension etc

$LN{arg, [,delimiter]} -  Character count of a string or if delimiter is
given it splits and gives the element count instead.

$PE{arg, regex, groupid } - Pattern Extractor.. this is useful when we need
to match and get some matched regex groups.
Eg: localhost:8080 get port value..
$PM is logical $PR will manipulate and $PE will return matched groups

These things came to mind when experimenting with svl module. Perhaps you
may find some vars here are not very much useful in general scenario

Thanks



-- 
Regards,
*Shalitha Suranga*

Re: Adding more useful vars to svl-core

Posted by James Bognar <ja...@apache.org>.
I like it.  Go for it.

On Wed, Nov 14, 2018 at 1:42 AM Shalitha Suranga <sh...@gmail.com>
wrote:

> Hi..
>
> How about adding these vars.What do you think?
>
> $ST{arg, start [,end] } - Sub string of a string. will be useful when
> dealing with fixed length things like getting fixed extension etc
>
> $LN{arg, [,delimiter]} -  Character count of a string or if delimiter is
> given it splits and gives the element count instead.
>
> $PE{arg, regex, groupid } - Pattern Extractor.. this is useful when we
> need to match and get some matched regex groups.
> Eg: localhost:8080 get port value..
> $PM is logical $PR will manipulate and $PE will return matched groups
>
> These things came to mind when experimenting with svl module. Perhaps you
> may find some vars here are not very much useful in general scenario
>
> Thanks
>
>
>
> --
> Regards,
> *Shalitha Suranga*
>
>
>