주문 : 당신이 볼 수 있듯이정규식 : 반전 일치 내가 정규식 검색을 수행 할 수있는이 조각을 가지고
public IEnumerable<MyMatch> GetMyMatches()
{
Match m = myRegex.Match(Text, offset);
if (m != null && m.Success && m.Value != null && m.Value.Length > 0)
{
offset = m.Index+m.Length;
yield return new MyMatch() { Match=m, SomeFurtherInformation=... };
} else
yield break;
}
, 내 텍스트의 모든 occourences을 걸어.
그러나 검색 방향을 역으로 변환하는 방법은 무엇입니까? 당신의 도움이
참고 : m.Value! = 예외가 없으면 (너무 큰 오프셋과 같음) m :-)가없는 한 m! = null이 항상 true이고 일치하는 경우 Value = = "". – xanatos