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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -