Closed Thread Icon

Preserved Topic: DHTML RegExp Pages that link to <a href="https://ozoneasylum.com/backlink?for=18018" title="Pages that link to Preserved Topic: DHTML RegExp" rel="nofollow" >Preserved Topic: DHTML RegExp\

 
Author Thread
3rdperson
Paranoid (IV) Inmate

From: your subconscious. (scared yet?)
Insane since: May 2001

posted posted 05-24-2001 08:17

finally descending upon the DHTML forum, 3p works up the nerve to ask a question that is no doubt trivial to the local minds.
he clears his throat, and requests timidly:
"um, fellas?"
hoping someone, somwhere is listening, he continues.
"Ive been playing with regular expressions, and im after a particular one. i want, well 'the bit before the underscore'."
thinking about his current situation, he elaborates:
"say we have 'this_place', and 'that_place'. i want thisString to equal 'this' or 'that'.
if we say that place is the string that contains either 'this_place', or 'that_place', then so far what i came up with was:
thisString = place.match(/[a-zA-Z]*/)[0]."
hoping that the other asylumnites can understand his discontent, he adds:
"this JUST aint tidy enough for me. i mean, it works, but does anyone know a nicer way? if not, fine, but anything to increase my knowledge of regular expressions wouldbe beneficial!"
wonderinf if this is hospitible enough, he decides to conclude his post on a positive note:
"thanks guys! "

person

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 05-24-2001 08:29

thisString = place.match(/(.+?)_/)[1];

thisString = place.split(/_/)[0];

3rdperson
Paranoid (IV) Inmate

From: your subconscious. (scared yet?)
Insane since: May 2001

posted posted 05-25-2001 06:01

3p looks, ponders, looks, ponders a little more, tries, and smiles.
"thanks mr max! that really helped me get a hang of this regular expression stuff!" 3p says, with genuine gratitude.
and he quickly resumes work before his boss spots him on the net.

person

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 05-25-2001 20:54

Ooooh! I get it! "Third person"! Gotcha.

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 06-08-2001 17:06

threep, describe us your boss man!

Doesn't he realize that beeing on newsgroups and forums most of the times is helpfull?


Carnage
Nervous Wreck (II) Inmate

From:
Insane since: May 2001

posted posted 06-08-2001 17:12

Depends on the newsgroups and forums

This forum is generally very helpful (cept to most of my posts

Now some of the other forums I'm on deal with zip with my job or most anyone elses job. Unless of course you sell high performance car parts on them.

Carnage

« BackwardsOnwards »

Show Forum Drop Down Menu