S
si
hi, i have a regex question for the gurus here
str = "aa (b c d) ee ff=1.7e-006 gg=4.1 hh=1 ii=on"
notes:
- the string between the parenthesis can be any length,
eg b c d b1 c1 d1 b2 c2 etc.... )
- there can be any number of name=value pairs at the end of the
expression
eg: ff=1.7e-006 gg=4.1 hh=1 ii=on jj=2.5 kk=connected etc
what would be regex that would return the below?
$name = 'aa'
@friends = ('b', 'c', 'd')
$alias = 'ee'
%pairs = ( 'ff', 1.7e-006,
'gg', 4.1,
'hh', 1, etc .. )
thx thx thx!
str = "aa (b c d) ee ff=1.7e-006 gg=4.1 hh=1 ii=on"
notes:
- the string between the parenthesis can be any length,
eg b c d b1 c1 d1 b2 c2 etc.... )
- there can be any number of name=value pairs at the end of the
expression
eg: ff=1.7e-006 gg=4.1 hh=1 ii=on jj=2.5 kk=connected etc
what would be regex that would return the below?
$name = 'aa'
@friends = ('b', 'c', 'd')
$alias = 'ee'
%pairs = ( 'ff', 1.7e-006,
'gg', 4.1,
'hh', 1, etc .. )
thx thx thx!