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

  • Home
  • SEARCH
  • 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 7021299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:25:54+00:00 2026-05-27T23:25:54+00:00

I have a twitter feed in the format: 1. Username: Blah blah http://something.com #hashtag

  • 0

I have a twitter feed in the format:

1. Username: Blah blah http://something.com #hashtag
2. Username: Blah blah http://something.com #hashtag
3. Username: Blah blah http://something.com #hashtag

I’m removed the username, but how do I wrap tags (for styling) around the http:// parts and the #hashtags?

Here is my current coldfusion code:

 <cfset feedurl="http://twitter.com/statuses/user_timeline/MyUserID.rss" />
    <cffeed
        source="#feedurl#"
        properties="feedmeta"
        query="feeditems" />
    <cffeed
    source="#feedurl#"
    properties="feedmeta"
    query="feeditems" />
<ul>
    <cfoutput query="feeditems">
        <cfsavecontent variable="twitterString">
        #content#
        </cfsavecontent>
        <li>#REReplace(twitterString, "UserName: ", "")#</li>
    </cfoutput>
</ul>
  • 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-27T23:25:54+00:00Added an answer on May 27, 2026 at 11:25 pm

    This worked for me:

     <cfset feedurl="http://twitter.com/statuses/user_timeline/jakefeasel.rss" />
        <cffeed
            source="#feedurl#"
            properties="feedmeta"
            query="feeditems" />
        <cffeed
        source="#feedurl#"
        properties="feedmeta"
        query="feeditems" />
    <ul>
        <cfoutput query="feeditems">
    
            <cfsavecontent variable="twitterString">
            #REReplace(content, "UserName: ", "")#
            </cfsavecontent>
            <cfset formattedString = twitterString>
    
            <cfloop array='#[{"regex" = 'http://\S+', "class" = "URL"}, {"regex" = "##\w+", "class" = "hashTag"}]#' index="regexStruct">
                <cfset currentPos = 0>
                <cfset matches = ReFindNoCase(regexStruct.regex, twitterString, currentPos, true)>
                <cfloop condition="matches.len[1] IS NOT 0">
                    <cfset formattedString = Replace(formattedString, mid(twitterString, matches.pos[1], matches.len[1]), "<span class='#regexStruct.class#'>" & mid(twitterString, matches.pos[1], matches.len[1]) & "</span>")>
    
                    <cfset currentPos = matches.pos[1] + matches.len[1]>
                    <cfset matches = ReFindNoCase(regexStruct.regex, twitterString, currentPos, true)>
                </cfloop>
            </cfloop>
    
            <li>
                #formattedString#
            </li>
        </cfoutput>
    </ul>
    

    You’ll obviously have to provide styles for the “URL” and “hashtag” classes.

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

Sidebar

Related Questions

I have a JavaScript variable similar to: a_name_string: RT @<a href=http://twitter.com/SomethinG>SomethinG</a>: Lorem ipsum dolor
Anyone have an pointers on an easy way to consume a search.twitter.com feed with
Example RSS feed link: http://twitter.com/statuses/user_timeline/twitter.rss Does anyone know if Twitter limits calls to a
I have set up an NSXMLParser to parse through a Twitter feed, but I
I have a question regarding Twitter API. I came across something called Parameters and
I have a twitter feed and I create a new date obj so I
I have just coded twitter feed for my statuses fetching the xml. I was
I have am reading a twitter feed in my iPhone application and can do
Still trying to wrap my noggin around OAuth, but I have a question. I
i have a following feed from twitter and im making all links clickable and

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.