Jump to content


Photo

how long should a newbie in REGEX spending time figuring out?


  • Please log in to reply
4 replies to this topic

#1 bilis_money

bilis_money
  • Members
  • PipPipPip
  • Advanced Member
  • 621 posts

Posted 18 June 2006 - 03:01 AM

ok, i'm really new to REGEX.

and i think i'm spending too many hours just staring on an expression.
now tell me as a newbie on REGEX how many hours should a newbie spend on
figuring out and starring on one expression alone?

i think i'm spending 5 hours and 10 hours just for one expression alone.
is this bad for me as a newbie to REGEX or it's a normal routine?

ok, to give you an idea on what i'm starring at.
i'm figuring out how to upload multiple files using array, foreach and regex as well.

or is it now imperative for me to buy the book of Jeffrey Friedl's "Mastering Regular ExpressioN"?

thank you very much in advance on your comments and suggestions.




#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 18 June 2006 - 04:38 AM

Although it depends on the expression, 5 to 10 hours is way too much.

Regex has a very heavy "grasp factor": once you understand it, it becomes easy.
~ D Kuang

#3 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 19 June 2006 - 02:17 PM

Depends on the expression--take a look at this. When you work with an expression deconstruct it piece by piece. If you're using preg, use the x modifier to document it:

/
 (\d+) # capture all digits
 a # then look for an 'a'...
/x

Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#4 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 20 June 2006 - 12:12 AM

That regex is useless, I guess:
[a href=\"http://www.regular-expressions.info/email.html\" target=\"_blank\"]http://www.regular-expressions.info/email.html[/a]
~ D Kuang

#5 JimChuD

JimChuD
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 04 July 2006 - 09:02 AM

dont worry man it will flick eventually my recommendation is start small and work up...
once it clicks its sooooooo much easier..
i found a little book to regular expressions to give notes on whats what and such and that helped no end while i was writting it.. so have a look about..




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users