[SOLVED]How to do a search with multi criterias?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
tcr
Posts: 6
Joined: Thu Jun 03, 2010 7:49 am

[SOLVED]How to do a search with multi criterias?

Post by tcr »

Hi,

I use regular expression to find string in one column number but, now, I must to do a search on two criterias which are in different columns (same line):

Example :
1234569A54000000000000XXDAZERTQWERTTY

In column 8 search for "A" AND in column 25 search for "D"

I have tried something like this :
(^.{8}A54)(^.{25}D)

But without results..., I guess I misunderstood something in use o f regular expression :-(

Thank you very much for your help,

Thierry
Last edited by tcr on Fri Jun 18, 2010 10:24 am, edited 1 time in total.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Try
^.{7}A54.{14}D

This matches

Code: Select all

^      the beginning of a line
.{7}   any 7 characters
A54    the literal text: A54
.{14}  any 14 characters
D      the literal text: D
tcr
Posts: 6
Joined: Thu Jun 03, 2010 7:49 am

Post by tcr »

ben_josephs wrote:Try
^.{7}A54.{14}D

This matches

Code: Select all

^      the beginning of a line
.{7}   any 7 characters
A54    the literal text: A54
.{14}  any 14 characters
D      the literal text: D
Hi ,

That's I wanted!

Thank you very much.

Have nice day,

Thierry
Post Reply