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? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -