grouping in regular expression

  • Thread starter Thread starter litusahoo
  • Start date Start date
L

litusahoo

Guest
hi

i have a text like this "BEC 20 index on Monday 01 November 2029: 0.21%"

i want to have a regular expression that returns me 3 groups

1st is ---> BEC 20 index on

2nd is ---> Monday 01 November 2029

3rd is --->0.21%


i have an expression like this "(BEC 20 index on)\s([A-Za-z0-9\s])+:\s([0-9.])+"

but it is returning only the single line that is matching,

how can i divide it into 3 groups by using a regular expression


with regards





litu Here

Continue reading...
 
Back
Top