Hey guys, I'm in a spot of bother here and I need your help
I need to filter a string of numbers on a Text Document with over 2000 lines. Good thing is That they have the same amount of numbers, and the first six numbers are the same, Heres a exaple of what I want
[CODE] <bleh>
<blehheader>
href.codingshitidon'tevenknow"=1" else
goto stuff and stuff
codeforsomething="[U]72353163[/U]987"
(327238)
And bout 60 lines of stuff
<bleh>
<blehheader>
(32372)
href.codingshitidon'tevenknow"=1" else
goto stuff and stuff
codeforsomething="[U]72353163[/U]463"
end
[/CODE]
What I want
[CODE]
[U]72353163[/U]987
[U]72353163[/U]463
[/CODE]
So can someone give any suggestions, also, I don't mind if theres even away just to delete the text and only display numbers.
Is there an equal distance (line wise) between them?
Make a program in Visual basic.
[QUOTE=FalconKrunch;21678761]Make a program in Visual basic.[/QUOTE]
I don't have a clue where to start.
[editline]11:54PM[/editline]
[QUOTE=Hypershadsy;21678193]Is there an equal distance (line wise) between them?[/QUOTE]
No, I did however ( and boring'ly) Replaced ever a-z to a " ", But I don't want to do that every time I need to do it again. is there not just some Filtering softwhere?
[editline]12:04AM[/editline]
Sorry for the Tripost but does can CMSort do this stuff?
Use grep with wildcards. You can find all instances of 72353163*** and replace all or part of the string with something else.
[QUOTE=GiGaBiTe;21680835]Use grep with wildcards. You can find all instances of 72353163*** and replace all or part of the string with something else.[/QUOTE]
Could you give me a link? I googled "grep" And I have no idea what one it is.
[code]
while(<>) {
if(/(\d{6,})/) {
print "$1\n";
}
}
[/code]
Run with [url=http://www.activestate.com/activeperl/]perl[/url].
[QUOTE=GiGaBiTe;21680835]Use grep with wildcards. You can find all instances of 72353163*** and replace all or part of the string with something else.[/QUOTE]
Ok I have it, And I really have no clue what I am doing with it. is it Xpattern or...What lol...
So can you like tell me what exacly I have to put in so it will only show me them digits.
[QUOTE=zeromancer;21689243]Ok I have it, And I really have no clue what I am doing with it. is it Xpattern or...What lol...
So can you like tell me what exacly I have to put in so it will only show me them digits.[/QUOTE]
[url]http://en.wikipedia.org/wiki/Grep[/url]
It also comes with use examples.
Although if you want something more heavy-duty Perl is the way for you - twenty years ago and awk would've been recommended.
[QUOTE=HubmaN;21689262][URL]http://en.wikipedia.org/wiki/Grep[/URL]
It also comes with use examples.
Although if you want something more heavy-duty Perl is the way for you - twenty years ago and awk would've been recommended.[/QUOTE]
Brilliant, I got it To show about 180 records (Like I wanted) however it shows the line. I just want the digit, But I could just user Edit plus to delete the other text easly,
Is there any way of saving grep output as a file?