user707549
user707549

Reputation:

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?

Upvotes: 0

Views: 87

Answers (1)

Xophmeister
Xophmeister

Reputation: 9211

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

Upvotes: 2

Related Questions