获取一些字符串正则表达式
Get some piece of string regex
我有下面的字符串,我只想获取字符串的值:AttributeReferenceID
。我需要做什么?
我试过这个 [A]ttributeReferenceID (?<referenceID>\d+)
但没成功。我想要的字符串在日志的任何部分,所以字符串可以在第一行,第二行或最后一行。
要获取的字符串:
AttributeReferenceID 123
AttributeReferenceID 456
AttributeReferenceID 789
要丢弃的字符串:
ISCCAttributeReferenceID 091281 [09123na0]
ISCCAttributeReferenceID 123012 [i1208221]
ISCCAttributeReferenceID 091221 [0oas9019]
我有下面的字符串,我只想获取字符串的值:AttributeReferenceID
。我需要做什么?
我试过这个 [A]ttributeReferenceID (?<referenceID>\d+)
但没成功。我想要的字符串在日志的任何部分,所以字符串可以在第一行,第二行或最后一行。
要获取的字符串:
AttributeReferenceID 123
AttributeReferenceID 456
AttributeReferenceID 789
要丢弃的字符串:
ISCCAttributeReferenceID 091281 [09123na0]
ISCCAttributeReferenceID 123012 [i1208221]
ISCCAttributeReferenceID 091221 [0oas9019]