Avatar of Kyle Hamilton
Kyle Hamilton
Flag for United States of America asked on

need JAVA regex

hi,

I would like to be able to isolate part of a srting in JAVA:

Example strings:

secure.welcome.ru.email.html
secure.welcome.en-us.email.html

sso.sml.reset_passwd.ru.email.html
sso.sml.reset_passwd.en-us.email.html


I would like to extract "ru" and "en-us" as a variable (so I can append it to another string). Also, there may be other languages in the future, for example:

sso.sml.reset_passwd.sp.email.html

in which case I need "sp"

So basically, everything between the "." and  ".email.html"
JavaRegular Expressions

Avatar of undefined
Last Comment
Kyle Hamilton

8/22/2022 - Mon
SOLUTION
farzanj

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
CEHJ

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Kyle Hamilton

ASKER
Thank you.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy