Avatar of Kyle Hamilton
Kyle HamiltonFlag 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
SOLUTION
Avatar of farzanj
farzanj
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Kyle Hamilton
Kyle Hamilton
Flag of United States of America image

ASKER

Thank you.
Java
Java

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo