MealstroM
MealstroM

Reputation: 189

perl regex match line or null

ive got trouble with this regex:

$line1 = "bla <bla> bla F=<> bla <> <gggg> bla lba"
$line2 = "bla <bla> bla F=<somethingineed> bla <> <gggg> bla lba"

How can i match with single regex what is between <> in F=<> or F=<somethingineed> it can be null or some string.

Upvotes: 1

Views: 367

Answers (1)

Mark Synowiec
Mark Synowiec

Reputation: 5445

something like this should work, it'll only match stuff following F=

/F=<([^>]*)>/

Upvotes: 6

Related Questions