ruby on rails - Regular expression string between tags "<string>" -
i have string "<wpf><xaml><wpf-controls>". need string between tags in array format. how this?
the regex problem simple is: /<(.*?)>/ 
for array part reference answer on how use 1 line regular expression matched content
edit: array of insides of tags use <wpf><xaml><wpf-controls>".scan(/(?:<(.*?)>)*/)
the (?: .. ) groups tag , * says want 0 or more of group :) 
Comments
Post a Comment