New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Need regexp help
So, I came across interesting challenge, I need regexp to select everything (including match) after this:
My current code sucks big time:
Comments
I have no idea about regex, but played around a bit just for shits and giggles. :P
What about:
^(?:(?!(?=#)).)*$
However, I guess this would need some heavy finetuning and an or to filter the empty lines...
These days this is the job of sed, python (or something called perl that looks like random characters typed). Why do you specifically need a regexp?
In your case:
sed -n '/johantheghost at yahoo period com/,$p' /path/to/file.txt | tail -n +2
PS: Or this.
sed -n '/# # # # # # #/,$p' /path/to/file.txt
Anyhow this is not a regex.
Maybe i didn't understand well enough...
Or this, but it is inferior potassium and needs more work: