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 8577943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:16:27+00:00 2026-06-11T20:16:27+00:00

I want to check if news_text variable contains the same string inside the text

  • 0

I want to check if news_text variable contains the same string inside the text variable while looping. The string that news _text could have is :

“Yemen minister says Saleh trying to spoil transition http://t.co/aXOQPMzf“

and the string for the text variable is this

“RT @Reuters: Yemen minister says Saleh trying to spoil transition http://t.co/aXOQPMzf“

      for (var i = 0; i < full_array.length; i++) {
          var user = full_array[i].user;
          var date = full_array[i].date;
          var profile_img = full_array[i].profile_img;
          var text = full_array[i].text;
          var news_user = full_array[i].news_user;
          var news_date = full_array[i].news_date;
          var news_profile_img = full_array[i].news_profile_img;
          var news_text = full_array[i].news_text;

          if(text==news_text){
              geocode (user,date,profile_img,text,news_user,news_date,news_profile_img,news_text);
          }
    }

anyone that could help?

  • 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-06-11T20:16:28+00:00Added an answer on June 11, 2026 at 8:16 pm

    just use

    if (text.indexOf(news_text) > -1) // text contains news_text
        geocode(…);
    

    Edit: if you only need to search for the first 10 chars of news_text, use

    if (text.indexOf(news_text.substr(0, 10)) > -1) // text contains news_text
        geocode(…);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If the following string is what I want to url-encode, @test123: http://news.yahoo.com/fifa%E6%96%A5%E8%B3%87%E5%8D%83%E8%90%AC-%E5%8A%A9%E6%88%91%E8%B6%B3%E7%90%83%E5%8D%87%E7%B4%9A-185314701.html check out
I want to check a string to allow only a-z A-Z 0-9 . /
I want check that that provided Rss feed Link Is valid or not and
I have an editText field for which I want check that it meets with
I don't want check if an item with a value exists in the arraylist,
I want to check which port is used, when the port is not explicitly
I want to check checkbox like $('#riderCheck').attr('checked','true') on some condition. but the problem is
I want to check if my many column in datagridview is empty. here my
I want to check a particular file exist in Azure Blob Storage. Is it
I want to check whether any Zip file is present on a specified path.

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.