How to write regex expression to remove particualr string

Hi,

How to write regex expression for below string to get the final output as

"d1a2227e-291f-4d82-8991-b9458b4ad0d3","fb48e632-3c85-483b-86b3-76f7a1c7eb25","93fa5301-29e2-4ef6-9353-686868686888"



input string= @Check:"workspace://SpacesStore/d1a2227e-291f-4d82-8991-b9458b4ad0d3" OR @Check:"workspace://SpacesStore/fb48e632-3c85-483b-86b3-76f7a1c7eb25" OR @Check:"workspace://SpacesStore/93fa5301-29e2-4ef6-9353-686868686888
chaituu chaituAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
HI,

pls try
workspace:\/\/SpacesStore\/

Open in new window

REgards
0
CEHJCommented:
That's ONE input string?
0
chaituu chaituAuthor Commented:
That's ONE input string?

yes
0
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

CEHJCommented:
You might try something like this (where input string is 's')

        Pattern p = Pattern.compile("/([a-f0-9\\-]+)\"");
        Matcher m = p.matcher(s);
        while (m.find()) {
            System.out.println(m.group(1));
        }

Open in new window

0
chaituu chaituAuthor Commented:
its working.May i know the meaning of this expression?
0
CEHJCommented:
It's just capturing the characters of those IDs only. More precise would be

        Pattern p = Pattern.compile("((?:[a-f0-9]+-){4}[a-f0-9]+)");
        Matcher m = p.matcher(s);
        while (m.find()) {
            System.out.println(m.group());
        }

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chaituu chaituAuthor Commented:
what is the meaning of this ?:[a-f0-9]+-){4}  ???
0
CEHJCommented:
Capture groups of lower case hex characters separated by hyphens
0
Shaun VermaakTechnical SpecialistCommented:
See the explanation section on the right-hand side of
https://regex101.com/r/L5FxH4/1
0
CEHJCommented:
Sorry - let me be a little more precise:
Capture groups of lower case hex characters followed by hyphens four times (the remainder of pattern is explained by the first seven words [only] of this sentence)
0
CEHJCommented:
:)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Regular Expressions

From novice to tech pro — start learning today.