i have a Javascript regex.
/\[([^:]*)\]/gi
Basically what it needs to do is to get content of [ ] and place it inside of HTML tag src. Like bbForums do.
Problem is when i have input as [somescr] i get proper results but when i have more than one [somesrc] [someothersrc] in row, Regex matches everything between first and last brackets ( ie. somesrc] [someothersrc )
Can you help me with it?
thanks
Try using
/\[([^:]*?)\]/giFor more info, see this SO question.