그래, 내가 정규식을 가지고 있고 그것을 여러 줄 문자열에서 일치하는 것을 찾아야한다.첫 줄 일치 후 정규식 중지
Device Identifier: disk0
Device Node: /dev/disk0
Part of Whole: disk0
Device/Media Name: OCZ-VERTEX2 Media
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Content (IOContent): GUID_partition_scheme
OS Can Be Installed: No
Media Type: Generic
Protocol: SATA
SMART Status: Verified
Total Size: 240.1 GB (240057409536 Bytes) (exactly 468862128 512-Byte-Blocks)
Volume Free Space: Not applicable (no file system)
Device Block Size: 512 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Ejectable: No
Whole: Yes
Internal: Yes
Solid State: Yes
OS 9 Drivers: No
Low Level Format: Not supported
는 기본적으로 나는 구분자로 콜론과 두 그룹으로 각 라인을 분리해야합니다 이것은 내가 사용하고있는 문자열입니다. 내가 사용하고있는 정규식은 다음과 같습니다
@"([A-Za-z0-9\(\) \-\/]+):([A-Za-z0-9\(\) \-\/]+).*"
그것은 작업을 수행하지만 첫 번째 줄을 수정 해 내가 원하는처럼 두 그룹으로 분리하지만 그 시점에서 멈 춥니 다. 여러 줄 옵션을 시도했지만 아무런 차이가 없습니다.
나는 정규식 세계에 처음 온 것을 인정해야한다.
도움을 주시면 감사하겠습니다.
사용중인 C# 코드를 포함 할 수 있습니까? –
나는 내 컴퓨터를 돌아 다닌다. –