Does anyone out there know of a regex command that will take the following string
url = http://184.154.145.114:8013/wlraac name = wlr samplerate = 44100 channels = 2 format = S16le
and remove everything but the following
wlr
This line will come up multiple times, where everything changes after the = sign and each time all I want to keep is whats after name =
any help is appreciated
You could do something like
and replace with the content of group 1
See it here on Regexr
I search for “name =” and anything before. The
\s*matches the following whitespace.Then the
\w+inside brackets.\wwill match any character and digit and underscore (if you use the optionPattern.UNICODE_CHARACTER_CLASSotherwise it sticks to ASCII only) . Because of the brackets it is stored in the first group.Or your code