Tag: Substring
Posts of Tag: Substring
  1. JavaScript: Check if String Contains a Substring

    JavaScript: Check if String Contains a Substring A common operation in many programming languages is to check if a string contains another string. While it's a simple and common task, the method names often dif...Learn More
    NodejsJavaScriptStringSubstringFrameworkProgramming Languages
  2. Find shortest substring

    I have written a code to find the substring from a string. It prints all substrings. But I want a substring that ranges from length 2 to 6 and print the substring of minimum length. Please help me Program: imp...Learn More
    PythonSubstringProgramming Languages
  3. Find string between two substrings

    How do I find a string between two substrings ('123STRINGabc' -> 'STRING')? My current method is like this: >>> start = 'asdf=5;' >>> end = '123jasd' >&gt...Learn More
    StringPythonSubstringProgramming Languages
  4. Locate "N Gram" substrings that are smallest distance away from a target string N character long

    I am looking for an algorithm, preferably in Python that would help me locate substrings, N characters long, of exisiting strings that are closest to a target string N character long. Consider the target string...Learn More
    PythonStringSubstringstring-matchingProgramming Languages
  5. Location of Substrings within strings and their extentions

    this is a python noob posting here so plz dont be too harsh I am tying to create a list of strings that are taken from a larger string which has multiple copys of the substring which in contains a relevent phr...Learn More
    PythonSubstringProgramming Languages
  6. Python : Need to extract tag content from html page using regex, but not BeautifulSoap

    i have a requirement wherein i have to extract content inside <raw> tag. For example i need to extract abcd and efgh from this html snippet: <html><body><raw somestuff>abcd</raw>&...Learn More
    PythonHTMLregexTagsSubstringProgramming Languages
  7. Python: Effective replacing of substring

    I have code like this: def escape_query(query): special_chars = ['\\','+','-','&amp;&amp;','||','!','(',')','{','}','[',']', '^','"','~','*','?',':'] for character in specia...Learn More
    PythonReplaceSubstringProgramming Languages
  8. Regular Expression to remove html tags from a string in Python

    I am fetching my resut from a RSS feed using following code: try: desc = item.xpath('description')[0].text if date is not None: desc =date +"\n"+"\n"+desc except: desc = None But sometimes ...Learn More
    PythonregexStringSubstringProgramming Languages
  9. Regular Expression to remove &quot; &#39; from a string in Python

    I am fetching my result from a RSS feed using following code: try: desc = item.xpath('description')[0].text if date is not None: desc =date +"\n"+"\n"+desc except: desc = None But sometimes the descr...Learn More
    PythonregexStringSubstringProgramming Languages
  10. freeing substring without doing double free in c

    Yesterday I asked a similar question regarding how to free allocated memory for a sub-string. Now I have one more question regarding the same problem (involving a set of conditions), how could I free the follow...Learn More
  11. Check substring match of a word in a list of words

    I want to check if a word is in a list of words. word = "with" word_list = ["without", "bla", "foo", "bar"] I tried if word in set(list), but it is not yielding the wanted result due to the fact in is matching...Learn More
    PythonSubstringstring-matchingProgramming Languages
  12. Python: Improving sub-string search by embedding sophisticated algorithms

    I am extending my previous question python efficient substring search, I am interested to improve the performance of sub-string search implementation, Some of the answers from my previous question pointed ou...Learn More
    PythonPerformanceAlgorithmSubstringProgramming LanguagesDev