Help me to split string with Regular Expression
Posted
by
Lu Lu
on Stack Overflow
See other posts from Stack Overflow
or by Lu Lu
Published on 2011-01-10T10:51:51Z
Indexed on
2011/01/10
10:53 UTC
Read the original article
Hit count: 280
Hello, I have a string: CriteriaCondition={FieldName={*EPS}*$MinValue=(-201)$MaxValue=(304)$TradingPeriod=(-1)}
Help me to get the first word which ends with the first word "={" & get the next following word which ends with "}".
The result must be: Word1 = "CriteriaCondition" Word2 = "FieldName={EPS}$MinValue=(-201)$MaxValue=(304)$TradingPeriod=(-1)"
And with the string "FieldName=(EPS)$MinValue=(-201)$MaxValue=(304)$TradingPeriod=(-1)", help me to split to pairs:
FieldName EPS
MinValue -201
MaxValue 304
TradingPeriod -1
Thanks.
© Stack Overflow or respective owner