tags:

views:

40

answers:

4

How would I match 'ber' to the end so it picks up 'ber/sunday/wednesday'

monday/october/sunday/wednesday

+3  A: 

Something like ber.*$.

LukeH
A: 

Just use ber.*

SimpleCoder
A: 

"monday/october/sunday/wednesday".match(/ber.*/)

Chris Heald
A: 

/ber.*/ for one-line string

/ber.*?$/m for multiline string, where ber can be not in the first line

Nakilon