0

I'm new to regex. I try to research it.

I am reading following article:

http://www.tutorialspoint.com/java/java_regular_expressions.htm

snippet from article:

^   Matches beginning of line.

and

\A  Beginning of entire string

I don't understand the difference. Can you clarify this ?

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

1 Answers1

6

Difference is apparent when you use MULTILINE switch where ^ is matched at start of every line but \A is still matched only once at start of very first line.

anubhava
  • 761,203
  • 64
  • 569
  • 643