Page 1 of 1

error message

Posted: Thu Mar 04, 2010 7:27 pm
by cmsullivan
What does the message: "Cannot find regular expression:.............................................0033" mean? I am trying to locate postion 46 (4 in length) and this message keeps appearing. There are thousands of records, 210 positions each.
The selections used are: files-*.txt *.ini; conditions: text and regular expression.

Posted: Thu Mar 04, 2010 9:05 pm
by ben_josephs
It means that no part of your text is matched by that regular expression. That is, there is no line containing 45 characters followed by the 4 characters 0033. Please post an example of a line that you want to match.

For the following examples, use Posix regular expression syntax (for your original example this setting doesn't make any difference):
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
Your regular expression can be more readably written as
.{45}0033

To ensure that the 0033 starts at column 46 you need to anchor the beginning of the regex at the beginning of the line:
^.{45}0033

Posted: Thu Mar 04, 2010 9:21 pm
by cmsullivan
I opened a blank document which looked like this:
.............................................0033
The actual record looks like this:
1101331002181084579099990001084570355232065900000000001005310002136020036100000100000000180000640001015004279306000000000084570300000000041520000DVL800000000000000000415200000000000 0495900000000000000000000
I inserted the underline where the fields are I'm trying to capture

Posted: Thu Mar 04, 2010 9:34 pm
by ben_josephs
That record doesn't contain 0033 anywhere. What are you trying to match?

Posted: Thu Mar 04, 2010 9:44 pm
by cmsullivan
That was just a sample of the record layout I'm using. I can send an actual record if you prefer.

Posted: Thu Mar 04, 2010 10:37 pm
by ben_josephs
You described the record you posted before as an actual record. Please post an actual actual record, and please provide a precise description of what you are looking for.

Posted: Fri Mar 05, 2010 2:33 am
by Bob Hansen
I think he is looking for chars 46-49.

This should work.....
Search for: ^.{45}(.{4}).*$
Replace with: \1

Posted: Fri Mar 05, 2010 12:49 pm
by cmsullivan
That is exactly what I'm trying to get, Characters 46-49.