• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: schizoid
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

😀<------------

Heh.

When you type in "poop" there, it comes out...well...it says poop! But it's all big and stuff.

I'm sure it'd mess up the spacing if I cut and pasted, but you can use your imagination.

You at Davis?
 
Originally posted by: notfred
Originally posted by: schizoid
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

😀<------------

Heh.

When you type in "poop" there, it comes out...well...it says poop! But it's all big and stuff.

I'm sure it'd mess up the spacing if I cut and pasted, but you can use your imagination.

You at Davis?

I was.

I might be again, if God decides he hates me and wants to see me suffer through another 4 years in the PhD program (and threatens to smite down Duke, USC, UCSB, UCSD and NYU if they accept me).

I wrote Droppin' Sez, if you ever read that.

 
Originally posted by: notfred
Nope never read that 🙂

I hate you.

Sigh...my column ruled.

Prolly cuz I rule.

But yeah, you'll be able to read it online soon enough.

WEEEEEEEEEEEEeeeeeeeeeeeee

you go to Davis?

 
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

😀<------------

stupid website.

"sorry, no funky punctuation, too many people try and hack me with backticks and pipes and whatnot."

hey that's my stupid website 😉

and that page is ancient, be easy on a newbie.

Nah, I was trying to hack it with backticks and pipes and stuff, so the message was deserved 😱
 
Originally posted by: notfred
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

😀<------------

stupid website.

"sorry, no funky punctuation, too many people try and hack me with backticks and pipes and whatnot."

hey that's my stupid website 😉

and that page is ancient, be easy on a newbie.

Nah, I was trying to hack it with backticks and pipes and stuff, so the message was deserved 😱

at first i tried some regex magic to only allow certain punctuation marks, but i said screw it, "better safe than sorry", and just allowed a-zA-Z0-9 🙂
 
Originally posted by: BingBongWongFooey

at first i tried some regex magic to only allow certain punctuation marks, but i said screw it, "better safe than sorry", and just allowed a-zA-Z0-9 🙂

cant do \w\d with the inferior product known as PHP or what? 😛
 
Originally posted by: notfred
Originally posted by: BingBongWongFooey

at first i tried some regex magic to only allow certain punctuation marks, but i said screw it, "better safe than sorry", and just allowed a-zA-Z0-9 🙂

cant do \w\d with the inferior product known as PHP or what? 😛

think so. i've never gotten real deep into regex, so i tend to forget things like that.

and php supports full perl regex's 😀

preg_match() and preg_replace()
 
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey

at first i tried some regex magic to only allow certain punctuation marks, but i said screw it, "better safe than sorry", and just allowed a-zA-Z0-9 🙂

cant do \w\d with the inferior product known as PHP or what? 😛

think so. i've never gotten real deep into regex, so i tend to forget things like that.

and php supports full perl regex's 😀

preg_match() and preg_replace()


preg_replace? Is that like a weird combination of abortion and aritficial ensemination?

 
Originally posted by: schizoid
Originally posted by: BingBongWongFooey
Originally posted by: notfred
Originally posted by: BingBongWongFooey

at first i tried some regex magic to only allow certain punctuation marks, but i said screw it, "better safe than sorry", and just allowed a-zA-Z0-9 🙂

cant do \w\d with the inferior product known as PHP or what? 😛

think so. i've never gotten real deep into regex, so i tend to forget things like that.

and php supports full perl regex's 😀

preg_match() and preg_replace()


preg_replace? Is that like a weird combination of abortion and aritficial ensemination?

not since 4.1
 
Originally posted by: notfred
Originally posted by: Ameesh
rolleye.gif


god i hate perl coders

and we just love MS fanboys
rolleye.gif


and I hate all coders and coding...

My boss just came up to me an said he want's me to add a feature to an age old Cobol program we still use...
(custom made for us, and costed an arm and leg at the time...)
"I just want a button that let's me send a listing or report I take by email... shouldn't be too hard!"
I was like:
"Yeah, button shouldn't be too hard... but do you want the button actually to do something???"

Shit, here I am learning Cobol of all languages... I love this job...
:frown:
 
Originally posted by: DaFinn
Originally posted by: notfred
Originally posted by: Ameesh
rolleye.gif


god i hate perl coders

and we just love MS fanboys
rolleye.gif


and I hate all coders and coding...

My boss just came up to me an said he want's me to add a feature to an age old Cobol program we still use...
(custom made for us, and costed an arm and leg at the time...)
"I just want a button that let's me send a listing or report I take by email... shouldn't be too hard!"
I was like:
"Yeah, button shouldn't be too hard... but do you want the button actually to do something???"

Shit, here I am learning Cobol of all languages... I love this job...
:frown:

i'm sure you will survive. i flip burgers for a dollar over minimum wage.
 
Originally posted by: BingBongWongFooey
Originally posted by: DaFinn
Originally posted by: notfred
Originally posted by: Ameesh
rolleye.gif


god i hate perl coders

and we just love MS fanboys
rolleye.gif


and I hate all coders and coding...

My boss just came up to me an said he want's me to add a feature to an age old Cobol program we still use...
(custom made for us, and costed an arm and leg at the time...)
"I just want a button that let's me send a listing or report I take by email... shouldn't be too hard!"
I was like:
"Yeah, button shouldn't be too hard... but do you want the button actually to do something???"

Shit, here I am learning Cobol of all languages... I love this job...
:frown:

i'm sure you will survive. i flip burgers for a dollar over minimum wage.

haha, your job sucks.
 
Originally posted by: notfred
Originally posted by: BingBongWongFooey
Originally posted by: DaFinn
Originally posted by: notfred
Originally posted by: Ameesh
rolleye.gif


god i hate perl coders

and we just love MS fanboys
rolleye.gif


and I hate all coders and coding...

My boss just came up to me an said he want's me to add a feature to an age old Cobol program we still use...
(custom made for us, and costed an arm and leg at the time...)
"I just want a button that let's me send a listing or report I take by email... shouldn't be too hard!"
I was like:
"Yeah, button shouldn't be too hard... but do you want the button actually to do something???"

Shit, here I am learning Cobol of all languages... I love this job...
:frown:

i'm sure you will survive. i flip burgers for a dollar over minimum wage.

haha, your job sucks.

thanks.
 
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

😀<------------

|_ _|_ __ ___ _ __ ___ __ _ | ___|_ _____| | _| |_ __ _ _ __ __| |
| || '_ ` _ \| '_ ` _ \ / _` | | |_ \ \ / / __| |/ / __/ _` | '__/ _` |
| || | | | | | | | | | | (_| | | _| \ V / (__| <| || (_| | | | (_| |
|___|_| |_| |_|_| |_| |_|\__,_| |_| \_/ \___|_|\_\\__\__,_|_| \__,_|


Damn it didn't work 🙁
 
Originally posted by: ffmcobalt
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

😀<------------

|_ _|_ __ ___ _ __ ___ __ _ | ___|_ _____| | _| |_ __ _ _ __ __| |
| || '_ ` _ \| '_ ` _ \ / _` | | |_ \ \ / / __| |/ / __/ _` | '__/ _` |
| || | | | | | | | | | | (_| | | _| \ V / (__| <| || (_| | | | (_| |
|___|_| |_| |_|_| |_| |_|\__,_| |_| \_/ \___|_|\_\\__\__,_|_| \__,_|


Damn it didn't work 🙁

immafucktard?
 
Originally posted by: ffmcobalt
Originally posted by: BingBongWongFooey
I still type "echo poop" at unix prompts because I think it's funny.

😀<------------

|_ _|_ __ ___ _ __ ___ __ _ | ___|_ _____| | _| |_ __ _ _ __ __| |
| || '_ ` _ \| '_ ` _ \ / _` | | |_ \ \ / / __| |/ / __/ _` | '__/ _` |
| || | | | | | | | | | | (_| | | _| \ V / (__| <| || (_| | | | (_| |
|___|_| |_| |_|_| |_| |_|\__,_| |_| \_/ \___|_|\_\\__\__,_|_| \__,_|


Damn it didn't work 🙁

Doh! 😀
 
Originally posted by: notfred
regular expressions are one of the best things ever.

CFG >> Regular Expressions

Python runtime is faster then perl as python standard libraries are nativly compiled C apps rather then esoteric interperted nonsense.

and I'm gonna have to go with Schizoid on this: ML is the most ass language out there, i hate it, its the devil. when people say somebody set us up the bomb, that "somebody" is ML
 
Originally posted by: Ameesh
Originally posted by: notfred
regular expressions are one of the best things ever.
CFG >> Regular Expressions
Huh? I googled for CFG and didn't find anything that looked relevant, except for some C header file processor thing on the 3rd or 4th page. Oh well, what Ameesh says is not going to deter me from continuing in my journey to learn regular expressions, since he only says they are not the best simply because he has an allergic reaction to all things open source.
rolleye.gif
 
Originally posted by: BingBongWongFooey
$filename =~ s/^.*[\/\\]([^\/\\]+)$/$1/;

filename = re.sub(r'^(.*)[/\]([^/\]+)$', r'\1', filename)

python > perl 😀

I don't trust any language that determines for me the way I have to format my code. I'll tab where I want to tab, d@mn it! 😀
 
For someone that loves Perl and regular expressions so much, one would think you'd craft an efficient expression 🙂

Why bother w/ the superfluous '.' and the greedy quantifier? ([^\/\\]+)$ would work just as nicely.
 
Back
Top