본문 바로가기

연구

regular expression ?<=

Positive lookahead

positive lookahead works


q(?=u)


matches a q that is follwed by a u


negative lookahaed  works


q(?!u)


matches a q that is not followed by a u


Positive lookbehind

Lookbehind has the same effect, but works backwards


positive lookbehind works

(?<=a)b


matches a b in cab but does not match  a in bed or debt


ref : https://www.princeton.edu/~mlovett/reference/Regular-Expressions.pdf



'연구' 카테고리의 다른 글

배열 동적 할당  (0) 2013.06.24
PrimeSense/Sensorv2 The device is not connected!  (0) 2012.11.23
로봇의 궁극적 목표 인간성의 회복이다.  (3) 2012.08.23
latitude, longitude  (0) 2012.07.26
Great Circle distance  (0) 2012.07.26