我需要为这些系统日志条目提取配置文件。
May 11 09:35:59 server-0548 ea_appserver: env=ACPT profile=product_api java[31185]: 2017-05-11 09:35:59,210 server-0548 org.hibernate.internal.SessionFactoryImpl ServerService Thread Pool -- 51 HHH000008: JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
以下正则表达式适用于 PCRE,但我似乎无法将其转换为 POSIX。
(?m)profile=(\S+)
我试过了
[^=]*$
和
.*profile=(.*)
但不能停下来product_api