Welcome to the Mythicsoft Q&A site for:

- Agent Ransack
- FileLocator Lite
- FileLocator Pro

Please feel free to ask any questions on these products or even answer other community member questions.

Useful Links:

- Contact Us
- Help Manuals
- Mythicsoft Home
0 votes

How do i search the nth column (e.g. the 7th column) of some semi-colon based text data, here's some sample data:

87 26947;00:11:57;31;10;200;id0;I feel the urge to sing!;Data;;;;;0;0
41 26947;00:11:01;31;10;200;id1;Fun times at NY;;;;;0;0
196 26948;11:46:22;30;10;200;id2;Wow NY is great;data5;;;;;0;0
350 2694;21:11:46;30;10;200;id3;Im at Supercenter;NY;;;;0;0
962 2694;22:11:21;30;10;200;id4;I am here;NY;;;;;0;0

How do I search for 'NY' but only when it's in the 7th column?

by (715 points)

1 Answer

0 votes

Using a regular expression you can find the first 6 preceeding columns (ie semi-colons) and then search in the 7th, e.g.

^([^;]*;){6}.*NY

If you wanted to search for the word fish in columns 2-4 you would use the expression:

^([^;]*;){2,4}.*\bFish\b

The \b represents the 'word boundary'.

by (30.1k points)
...