简体   繁体   中英

How to match the following output using regular expression

The room information:

singleRoom (male): 0x3
singleRoom (famle): 0x0

I want to match the second line of the output: singleRoom (male): 0x3 and get the value 0x3 which is hexadecimal. how to achieve it without using the " * " pattern?

^singleRoom \\(male\\): (0x[a-fA-F0-9]+)$

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM