Jump to content

Archived

This topic is now archived and is closed to further replies.

bilis_money

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

Recommended Posts

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.


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Depends on the expression--take a look at [url=http://ex-parrot.com/~pdw/Mail-RFC822-Address.html]this[/url]. When you work with an expression deconstruct it piece by piece. If you're using preg, use the x modifier to document it:

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.