Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » substrings
Showing page 1 of 2 (12 total posts)
  • Replacing text with matched text from same string

    Hello, I need help on matching and replacing text with different matched text from same string. My goal is to be able to batch process a large set of text files that each have similar patterns and replacement criteria. Below is an example of a typical case. In the example below, BOLD text replaces strikeout text: TITLE: Beautiful Losers - ...
    Posted to Construction Advice (Forum) by dhl on August 15, 2008
  • Re: finding substring from index a to b

    Actually, I just figured out a very sweet way of doing this ...   Doesn't neet any complicated pattern match at all ... I just need to use 'head -c <num>' and get the top <num> characters from a file and then pipe it to 'tail -c <num>' to get the bottom <num> characters.   Keeping ...
    Posted to Construction Advice (Forum) by vishalkapoor on October 1, 2007
  • Re: finding substring from index a to b

    Actually, I just figured out a very sweet way of doing this ...   Doesn't neet any complicated pattern match at all ... I just need to use 'head -c <num>' and get the top <num> characters from a file and then pipe it to 'tail -c <num>' to get the bottom <num> characters.   Keeping ...
    Posted to Construction Advice (Forum) by vishalkapoor on October 1, 2007
  • Re: finding substring from index a to b

    Hi Susan,   This works great ... but now there is one last problem ...   Now my input file is this:   CAAATAACTTCGAGATTATAGT GAGATTATAGTCAAATAACTTC AGTCAAACAAATAACTTCGAGA   And I am running this command on it:  perl -pe '/.{1}(.{10})/;$_="$1\n";' test2.txt   And the output I am ...
    Posted to Construction Advice (Forum) by vishalkapoor on October 1, 2007
  • Re: finding substring from index a to b

    Hi Susan,   That was great !! I am almost there - just one problem now.   Suppose my sample input.txt file now has just one line - AAAAAGGGGGAAAAATTTTT   Now I want to use one of the command line utilities to PRINT on the screen the first matched group (or the first backreference.) I want to print the backreference ...
    Posted to Construction Advice (Forum) by vishalkapoor on September 27, 2007
  • Re: finding substring from index a to b

    Oh, ddrudik, I just now realized what you meant ... ya, substrings would work perfectly fine.   But the problem is that the whole file itself is too large to hold in memory into a single concatenated string in the first place. Sure - I can use perl to simply chomp each input line and then >> the lines to an empty file - in that ...
    Posted to Construction Advice (Forum) by vishalkapoor on September 27, 2007
  • Re: finding substring from index a to b

    Thanks for the tip. I should have also mentioned in my post that the input file is huge (of the order of 10GBs or so) and the indices i,j which I am be looking for are usually a million apart. So I can preprocess the fileand concatenate the strings etc. - but I was hoping that I could just include a "\n" into my expression and it ...
    Posted to Construction Advice (Forum) by vishalkapoor on September 27, 2007
  • finding substring from index a to b

    Hi, I tried searching the forums, but could not get anything on this topic.   What I want to do is simple - given 2 indices i,j, return the substring which occurs between them.   My sample input.txt file ...
    Posted to Construction Advice (Forum) by vishalkapoor on September 27, 2007
  • String contains string

    Hi, I have text: "This is an example. I'll be missing you." and I want to match strings contain "is", so the result will be: "This" , "is" , "missing". Thanks for any help!   PS. I'm using java.util.regex :)
    Posted to Construction Advice (Forum) by de4th on June 19, 2007
  • Find substring

    Hello everybody, I almost feel bad about writing here - but I really tried for days now. I need a string filtered (matched) from a string like this:   @s My Company Ltd@o My-Street-adress 123@o New York@pt 123-35-144@t Mobile@pt 593-1195-1395   I am trying to filter out the company´s name (which always is from the beginning of ...
    Posted to Construction Advice (Forum) by christophn on April 25, 2007
1 2 Next >