error message

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
cmsullivan
Posts: 4
Joined: Thu Mar 04, 2010 7:01 pm

error message

Post 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.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post 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
cmsullivan
Posts: 4
Joined: Thu Mar 04, 2010 7:01 pm

Post 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
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

That record doesn't contain 0033 anywhere. What are you trying to match?
cmsullivan
Posts: 4
Joined: Thu Mar 04, 2010 7:01 pm

Post by cmsullivan »

That was just a sample of the record layout I'm using. I can send an actual record if you prefer.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post 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.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

I think he is looking for chars 46-49.

This should work.....
Search for: ^.{45}(.{4}).*$
Replace with: \1
Last edited by Bob Hansen on Sat Mar 06, 2010 12:49 am, edited 1 time in total.
Hope this was helpful.............good luck,
Bob
cmsullivan
Posts: 4
Joined: Thu Mar 04, 2010 7:01 pm

Post by cmsullivan »

That is exactly what I'm trying to get, Characters 46-49.
Post Reply