what's going on guys is quick and in this lecture, we're going to learn a PHP
regular expressions(Dallas website Development) so this is eighty cheated afraid here and I'm going to refer to it about this video and if you guys want a dollar a full resolution
of this image I have an included bank and inscriptions of this Lecture so if
you like to download to go and so so first of all live let's go to a website
called one on one and this is an also website that I would just discover
where you can practice regular expressions and rail expressions you can
think of them as basically wildcards on steroids so there are just patterns
to imagine a text and it's really useful if you're a web jeweler in the
one so I've matched some content on websites you can easily do cell with
regular expressions as well as mentioned any other content and also so for
the test or in I've included this pestering and the description of this
video as well and this is just a bunch of so a text that I've found where we
can you use the sex to practice using regular expressions on so I'm just
going to refer to this key cheat we're going to go over some of these these
quantifies care to classes groups and the ranges medicare is as well as
flags so we're going to go over all this just of and I'm going to explain
what most of these things mean so it was go had just started here so the man
which is any characters so if we simply could dot here it's going to match
all the characters on here and if I put star is going to which all the
things together so basically what the start is just to zero or more so in
this case if we put any character full followed by a zero and more this is
something that matches basically all the content so if you have a web said
or the other content placing a dot and a star heart will match anything and
he's probably they see something like this which is a wildcard dot and a
star followed by the for example when if I open up in north at here and you
go flying low then you get a sea down here and the types documents this is
the exactly the as the gray expression that's down here which is a start and
they die followed by the tea which means it's going to match [UH] files
within the text and there's another one of the years which basically says
match any extension at all and the star [UM] is exactly what that means
match anything so all right so that's how you match anything and let's see
here so please just means one there are more so that has to be something to
be matched where he starts you can match nothing or more that the question
mark is when things get a little interesting ok soul let me show you the
difference between the two so if I wanted to match these strong tags like
for example, if you have that if you have the constant website and for some
the reason you want a national HTML takes here is do you might do you might want
to do this right so who have this is what is called this is called the
greedy quantify fire because what will do here is you'll start with their
little [SMACK] angle bracket here and then you what you do when is basically
you're expecting to match all the content and then and then basically you
try to match this strong tack here but instead, this thing is greedy so is
going to go he had and match all the thing until it sees the adding angle
bracket here and that's what it's called green tea because they will match
will consume all the content in between the heavy this single bracket and
the single bracket here and if you wanted to make it a lazy your credit you
simply put a question mark your so now you can see that is matching the
asian my legs like we wanted them to and it's also doing that here so that's
the difference between greedy and deal

No comments:
Post a Comment