Creaticalmind

03 Caret ^ / dollar sign $ 캐럿, 꺽쇠 / 달러 (딸라표시) 본문

Regular expressions

03 Caret ^ / dollar sign $ 캐럿, 꺽쇠 / 달러 (딸라표시)

TigerBJ 2017. 12. 16. 02:52

Page 3

Some characters have special meanings. Character ^ matches the beginning of the line (Case 1) while dollar sign $ the end of the line (Case 2)

Source

who is who

Case 1

Regular Expression:^who
First match:who is who
All matches:who is who

Case 2

Regular Expression:who$
First match:who is who
All matches:who is who

http://zvon.org/comp/r/tut-Regexp.html#Pages~Page_3


Case1 : 문자열 앞에 [ ^ ] 를 붙이면, 해당 문자열로 시작하는 곳 검색

Case2 : 문자열 끝에 [ $ ] 를 붙이면, 해당 문자열로 끝이 나는 곳 검색

Comments