Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3791942
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:32:47+00:00 2026-05-19T12:32:47+00:00

I’m pulling in an RSS feed from a Tumblr blog. Unlike WordPress, which gives

  • 0

I’m pulling in an RSS feed from a Tumblr blog. Unlike WordPress, which gives a condensed version of the post in the <description> tag, Tumblr dumps the whole post into the feed with no shortened version at all. I’d like my Kynetx app only to output the first, say, 400 characters if the post is longer than that.

I could emit some JavaScript to do it, something like this:

if (post.length > 400) {
  post = post.substring(0, 400);
}

Is there a way to do something like that in KRL directly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T12:32:47+00:00Added an answer on May 19, 2026 at 12:32 pm

    Yes! You can use the extract function which will return an array of matches from a Regex.

    Extract function documentation

    truncated = originalString.extract(re/^.{100}/gi);
    
    Example Appruleset a60x549 {
      meta {
        name "string-truncate-test"
        description <<
          string-truncate-test
        >>
        author "Mike Grace"
        logging on
      }
    
      rule testingerlyish {
        select when pageview ".*"
        pre {
          originalString = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam id purus quis urna aliquam volutpat. Nullam ut velit enim. Cras eu libero felis, vitae adipiscing dolor. Mauris metus nisi, facilisis vitae hendrerit a, posuere in nisi. Integer convallis, odio eu ultrices luctus, arcu ligula ultrices neque, sit amet aliquet lorem diam eget ipsum. Morbi ullamcorper feugiat urna sagittis volutpat. Nullam tincidunt gravida sem, vel suscipit quam cursus egestas. Etiam quis felis leo, id blandit metus. Vestibulum lacinia tortor sit amet mi consectetur non malesuada arcu hendrerit. In placerat mauris nec quam dictum eleifend. Suspendisse consectetur rutrum mauris id vestibulum. Vivamus dignissim imperdiet lorem sit amet eleifend.      Etiam nulla est, feugiat non accumsan egestas, luctus in nulla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras orci libero, aliquet id ultricies id, tempor eu eros. Suspendisse ultricies enim quis dui malesuada condimentum. Sed in est velit, ac volutpat velit. Nunc aliquet commodo pellentesque. Curabitur egestas, nibh sed dapibus imperdiet, urna nisi ultricies justo, nec dictum nulla est vitae lectus. Morsapien purus tincidunt nulla, sit amet sodales nisi mi sit amet purus. In facilisis ligula vitae sapien aliquet condimentum. Integer lacus dolor, tincidunt dapibus consequat id, luctus et erat. Praesent vel nunc enim. Donec dignissim dui tincidunt lacus molestie in laoreet ligula placerat. Nullam elit magna, luctus sit amet vestibulum ut, dignissim eget elit. Pellentesque nunc massa, auctor sit amet venenatis sed, hendrerit eu nibh. Vestibulum in nisi purus, eget dictum velit. Phasellus pulvinar odio sed nulla egestas lacinia. Donec porttitor lobortis porta. Nullam imperdiet dapibus pulvinar. Sed ut quam tellus. Sed ornare vulputate facilisis. Suspendisse potenti. Nullam aliquet nulla id enim suscipit iaculis pellentesque lectus vulputate.  Cras ullamcorper nunc nec eros porta quis fermentum lectus mattis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Maecenas ac imperdiet nisi. Morbi nec elit in eros varius luctus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque aliquet, elit et mattis dignissim, metus tortor fringilla mauris, fermentum bibendum metus mi et lorem. Ut at magna quam, ac condimentum ipsum. Aenean aliquam elementum nisl vitae tempus. Fusce molestie, metus nec egestas facilisis, velit turpis bibendum quam, nec blandit arcu leo non ligula. Morbi nisl neque, gravida in pulvinar ut, sollicitudin eu nunc. Phasellus eget sagittis nunc. Praesent nibh libero, lacinia placerat fermentum a, fringilla sit amet mi. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed odio dolor, dignissim a dictum ut, fringilla sit amet purus. Duis et justo et felis tempus pulvinar id eget odio. Suspendisse ac turpis sit amet orci laoreet cursus. Aliquam at odio quis massa pulvinar sollicitudin. Cras nec laoreet metus.      Mauris consectetur mauris sit amet nulla rutrum quis tristique erat placerat. Phasellus id felis enim, et molestie dolor. Maecenas dignissim faucibus augue vitae pulvinar. Pellentesque auctor massa eu massa sagittis rutrum. In varius dignissim odio, eu .";
          truncated = originalString.extract(re/^.{100}/gi);
        }
        {
          notify("Truncated",truncated[0]) with sticky = true;
        }
      }
    }
    

    Example app run on example.com using bookmarklet:
    alt text

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have a text area in my form which accepts all possible characters from
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I would like to run a str_replace or preg_replace which looks for certain words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.