[wplug] Text searching
Weber, Larry A
laweber at switch.com
Mon Mar 17 10:04:49 EST 2003
Can the string you are searching for span multiple lines?
> -----Original Message-----
> From: Doug Green [SMTP:Green at np.awing.upmc.edu]
> Sent: Monday, March 17, 2003 9:07 AM
> To: wplug at wplug.org
> Subject: [wplug] Text searching
>
> Hi all-
>
> I have some large text files that I need to search. They are genomic
> sequences, and consist of 4 letters in a block of 10, separated by a
> space. There are 6 such blocks on a line, and each line is numbered for
> the order of the first letter (maybe 20,000+ lines per file?).
> Essentially, the format looks like this (obviously, the content is
> different):
>
> 1 atacaatagg atacaatagg atacaatagg atacaatagg atacaatagg atacaatagg
> 61 atacaatagg atacaatagg atacaatagg atacaatagg atacaatagg atacaatagg
>
> I need to be able to search within this kind of text file for a string of
> letters that is maybe 30-40 letters long, ignoring the spaces and numbers.
> The whole point is that I need to locate the position of my search string
> within the original text. Is there some fancy way to grep the file,
> ignoring spaces and numbers? Or to somehow filter out the spaces and
> numbers, creating a new file (maybe some cat option piped into a new
> file??)?
>
> Any help/suggestions are greatly appreciated! Thanks!
>
> Doug
>
More information about the wplug
mailing list