求助:正则表达式
本帖最后由 zbezj 于 2019-9-4 01:51 编辑53 4C 49 43 76 01 00 00 01 4D 4C 45 4E 4F 56 4F SLICv....MLENOVO
54 50 2D 48 30 20 20 20 60 10 00 00 50 54 4C 20 TP-H0 `...PTL
01 00 00 00 00 00 00 00 3F 00 00 00 06 02 00 00 ................
00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 .$..RSA1........
69 16 4A 3F A1 C0 4B 3A 3F 80 20 61 A1 A5 3F A8 B4 3E A8 A2 i.J..K:.. ....>.
80 49 3F 6A 65 26 72 1E A8 AA 3F 5F 2F A8 43 3F A8 A4 0A .I.je&r..._/....
A1 AF 3F 06 A6 CC 00 32 3B 29 02 61 4C 3F 3F A8 B0 3F 41 ......;)..L....A
77 3F 70 65 A8 AE 1B 09 A8 B0 63 5A A8 B9 A1 A7 3F 3F 5E A8 A6 w.p.....cZ....^.
15 3F A8 B4 A8 B2 79 A8 B9 05 A1 A4 4D 67 7F 2D 33 3F 33 20 ........Mg.-..3
A8 A2 3F 79 2A A1 EC 6A 77 3F 3F 20 2A 76 42 3F 3F A8 A6 ..y*.jw.. *vB...
3F 43 40 55 44 3F A8 A6 37 3F 5F 41 A1 AA 70 A8 AE 3F 3F .C@UD..7._A.p...
07 A8 AC 7B 1A 29 3F A8 A2 3F A1 AE 79 48 3F 6E 3E 3F 3F ..{.).....H.n>..
01 00 00 00 3F 00 00 00 00 00 02 00 4C 45 4E 4F ............LENO
56 4F 54 50 2D 48 30 20 20 20 57 49 4E 44 4F 57 VOTP-H0 WINDOW
53 20 01 00 02 00 00 00 00 00 00 00 00 00 00 00 S ..............
00 00 00 00 00 00 3F 5D 3F 04 3F 50 A8 A6 54 A8 AA 3F .......]...P.T..
3F 3F 3F 04 5B 3F 3F A8 AE 00 4D 40 A3 A4 79 61 3F 21 ....[....M@.ya.!
5A 40 69 3E A8 B2 00 A1 E9 12 6B 7F 56 A8 B0 A8 AE 1C 3F 38 Z@i>....k.V....8
A1 E8 13 61 3F 3F A8 A4 3F 41 3F A1 EA 76 A8 AA A8 AE A8 B4 4E 3F ..a....A..v...N.
1B 7C A1 E3 3F 58 2E 3F 61 A1 E4 61 A1 EA 68 A8 AA 04 3F 3F ....X......h....
43 39 63 3F 03 A1 C2 2D A8 AA 46 61 7A 70 66 3F 3F 2A C9c.....F.zpf..*
33 4F 79 3F 43 3F A1 A7 6E 56 3F A8 A8 46 3F 3F 72 3F 3Oy.C..nV..F..r.
37 3F A8 AC A8 AA 3F 7C 3F 65 41 4B 36 66 3F 61 A8 B9 55 7.......AK6f...U
3F A8 A2 2E 3F 65 3F ....e.
Signature : "SLIC"
Length : 0x176 (374)
Revision : 0x1 (1)
Checksum : 0x4D (77)
SLIC OA : 2.1
OEM ID : "DELL "
OEM Table ID : "TP-H0 "
OEM Revision : 0x1060 (4192)
Creator ID : "PTL "
Creator Revision : 0x1 (1)
OEM Public Key Structure
Length : 0x9C (156)
Reserved : 0x0 (0)
Algorithm : 0x2400 (9216)
类似于上面的字符,想提取【OEM ID : "DELL "中的DELL】
双引号中间有的有空格,有的没有空格。(比如OEM ID : "LENOVO")
请问大神怎么写正则表达式? StringRegExp($SLICTxt, '(?<=\OEM ID : ").*', 3) 读取出来是:DELL "
但是想得到的是DELL
(?mi)^\h*oem.+?"(.+?)\h*" 本帖最后由 gzh888666 于 2019-9-4 13:56 编辑
(?m)OEM\hID\h+\:\h\"(.+?)\h*\" 请用A版的,我只是练习一下,不严谨! afan 发表于 2019-9-4 07:32
(?mi)^\h*oem.+?"(.+?)\h*"
多谢大神,太厉害了。 gzh888666 发表于 2019-9-4 13:54
(?m)OEM\hID\h+\:\h\"(.+?)\h*\" 请用A版的,我只是练习一下,不严谨!
多谢哈:face (27):
页:
[1]