Page 1 of 1
Capture specify data from text
Posted: Tue Jul 27, 2010 8:47 am
by tengounamigo
hello all,
my question is if its possible to capture a concrete data from txt.
for example I have this txt.
GROUP=PEPAPEA AUTH=USE CONNECT-OWNER=PEPPEPEPE
CONNECTS=10,683 UACC=NONE LAST-CONNECT=09.215/18:57:44
CONNECT ATTRIBUTES=NONE
How I can capture all the variables that contains GROUP= (in this case PEPAPEA)
Is possible ??
Posted: Tue Jul 27, 2010 2:37 pm
by ak47wong
Possibly, but what do you mean by capture? Where do you want to capture it to? Do you want to transform the source text to something else?
Andrew
Posted: Tue Jul 27, 2010 3:06 pm
by SteveH
It would help if you can post an example showing the BEFORE and AFTER text you would want.
Posted: Tue Jul 27, 2010 3:46 pm
by tengounamigo
hello! and thanks for the interest
I try to explain me better. (and sorry for my english)
for expample:
after text:
fdkjshfjdskf
fkjdslkfjklds
fdkjdlsfklsdkñf
kdlfskñlfkñlds
GROUP=123445
dflkjls
fjkldsfjkldsj
dfjsklfjkld
GROUP=1111111
kdjfks
dsfjkjf
GROUP=1aaaaa
fjdskfjkldsj
before:
123445
1111111
1aaaaa
if not possible, with this is ok:
GROUP=123445
GROUP=1111111
GROUP=1aaaaa
I want to capture all Group=* contents.
Thank you.
Posted: Wed Jul 28, 2010 2:20 pm
by ben_josephs
I suspect you have your
after and
before labels the wrong way around.
Here's one way to do what you want.
Use Posix regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
1. Bookmark all the lines containing a
GROUP=value pair:
Search | Find... (
<F5>):
Find what: \<GROUP=
[X] Regular expression
Mark All
2. Copy the bookmarked lines into the paste buffer:
Edit | Copy Other | Bookmarked Lines
3. Open a new document and paste the lines there.
4. If there's only one
GROUP=value pair on any line use
Find what: .*\<GROUP=([^ ]+).*
Replace with: \1
[X] Regular expression
Replace All
Posted: Thu Jul 29, 2010 5:54 am
by tengounamigo
thank you very much !!!!!!!!!

Posted: Sat Jul 31, 2010 6:24 am
by Sam13
Thank you too..
Cheers everyone...