A
Ale Ds
I have to capture by means of regexp the content between '<' and '>'
as instance:
str = 'anystring<hour>anystring<min>anystring<sec>anystring'
I need the array['hour','min,'sec']
I have written the regexp: /(<([^<>]+)>)+/
and I have tested it in rubular.com site (It work !)
I have run it in irb:
Do you know why ?
thank you,
Alessandro
as instance:
str = 'anystring<hour>anystring<min>anystring<sec>anystring'
I need the array['hour','min,'sec']
I have written the regexp: /(<([^<>]+)>)+/
and I have tested it in rubular.com site (It work !)
I have run it in irb:
As you can see match method return just the first match in MatchData obj/(<([^<>]+)>)+/.match('anystring<hour>anystring<min>anystring<sec>anystring')
Do you know why ?
thank you,
Alessandro