다음과 같이 URL에 텍스트를 얻고 싶습니다. http://www.house-for-rent-one.com , 정규식과 함께 "rent-one"을 얻으려면 이것이 내가 지금까지 시도한 것입니다.
static readonly Regex Regex = new Regex(http://www.house-for-(?<getName>[A-Z-.]+).com, RegexOptions.Compiled | RegexOptions.IgnoreCase);
그러나 내 경우에는 작동하지 않습니다. Regex를 처음 사용했기 때문에 어떤 아이디어라도 감사하겠습니다. 감사
Pattern regex = Pattern.compile("http://www\\.house-for-(.*?)\\.com", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다