Convert C# regex Code to Java -


i have found regex extractor code in c#. can tell me how works, , how write equivalent in java?

// extract songtitle metadata header.  // trim needed, because stations don't trim songtitle filename =      regex.match(metadataheader,        "(streamtitle=')(.*)(';streamurl)").groups[2].value.trim(); 

this should want.

// create regex pattern pattern p = pattern.compile("(streamtitle=')(.*)(';streamurl)"); // create matcher matches pattern against input matcher m = p.matcher(metadataheader); // if found match if (m.find()) {     // filename second group. (the `(.*)` part)     filename = m.group(2); } 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -