On 07/12/2018 11:40 PM, Lauren C. wrote:
Hi Uri,
I was reading this page:
https://www.rexegg.com/regex-lookarounds.html
the content of "Mastering Lookahead and Lookbehind" make me confused.
(?=foo)
(?<=foo)
(?!foo)
(?<!foo)
They are too hard to understand for.
In my opinion PHP doesn't have this kind of stuff.
How do you think it?
i suggest you don't study lookarounds until you are stronger with basic
regex stuff. they are useful but not needed that often. you should start
with simpler stuff like character classes and their shortcuts, grouping
and grabbing and quantifiers (repeat counts). then move on to simple
zero-width assertions and other stuff. after you are very comfortable
with all that, there are plenty of deeper things to learn like
lookaround. walk before you run! :)
the site you list above seems like it is well written but its ordering
of lessons is way too fast and wrong IMO.
i highly recommend you read the official perl tutorial on regexes
(mentioned by someone else earlier)
https://perldoc.perl.org/perlretut.html
it has the right pace and topic order to learn simpler and more common
things first and builds on those. the site you found is more like a
firehose and your asking about lookaround is why it isn't a good tutorial.
uri
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/