When to use \A in regex?
Posted
by S.Mark
on Stack Overflow
See other posts from Stack Overflow
or by S.Mark
Published on 2010-04-16T04:11:21Z
Indexed on
2010/04/16
4:23 UTC
Read the original article
Hit count: 257
End of line anchor $
match even there is extra trailing \n
in matched string, so we use \Z
instead of $
For example
^\w+$
will match the string abcd\n
but ^\w+\Z
is not
How about \A
and when to use?
© Stack Overflow or respective owner