View Single Post
  #1   Report Post  
kaston kaston is offline
Junior Member
 
Posts: 0
Default search for strings separated by 1-n characters?

i want to do a regular expression search in a word doc that will let me find
two strings separated by say 50 characters of any type or less, assuming carriage returns are considered characters. the idea is to be able to search a document for 2 words that are separated by other unknown words but that are "close" to each other.

so if i want to find the strings "blah" and "ya"
i tried the expression blah?{1,50}ya hoping that the ?{1,50} would specify
1-50 single characters of any type. but this finds blah and ya even if they
are separated by many pages (hundreds of characters). what am i doing wrong?

thanks,
kaston