Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6099027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:13:33+00:00 2026-05-23T13:13:33+00:00

I have a WSDL (portion show below), from which I am trying to retrieve

  • 0

I have a WSDL (portion show below), from which I am trying to retrieve the names of all string elements using a regular expression.

<xs:element minOccurs="0" name="appCurrDpId" type="xs:string" />
<xs:element minOccurs="0" name="appCustomerCapable" type="xs:string" />
<xs:element minOccurs="0" name="appDateReceivedSys" type="xs:date" />
<xs:element minOccurs="0" name="appDecision" type="xs:string" />
<xs:element minOccurs="0" name="appPriority" type="xs:int"/>
<xs:element minOccurs="0" name="appCountry" type="xs:string" />

So I have a regex that matches the lines on which only the string elements occur:

name="(.*?)"\s?type="xs:string

But I am only interested in the portion enclosed by the first set of brackets (a group, right?), i.e. in the name attribute.

UPDATE:

The answers below have exposed a flaw in my understanding: I thought that being able to return a portion of a regular expression (as determined by a group) is a feature of a regular expression, which obviously it is not. It is more of a “side-effect”, and one that requires more complex processing.
In my case, I was hoping to be able to do this in my text editor (Sublime Text), because of the nifty ability to highlight and select all search results.
Anyway, thanks for the answers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:13:34+00:00Added an answer on May 23, 2026 at 1:13 pm

    As you don’t say which language you’re using, here a way to do it in perl:

    #!/usr/bin/perl 
    use strict;
    use warnings;
    
    while(<DATA>) {
        print $1,"\n" if /name="(.*?)"\s*type="xs:string/;
    }
    
    __DATA__
    <xs:element minOccurs="0" name="appCurrDpId" type="xs:string" />
    <xs:element minOccurs="0" name="appCustomerCapable" type="xs:string" />
    <xs:element minOccurs="0" name="appDateReceivedSys" type="xs:date" />
    <xs:element minOccurs="0" name="appDecision" type="xs:string" />
    <xs:element minOccurs="0" name="appPriority" type="xs:int"/>
    <xs:element minOccurs="0" name="appCountry" type="xs:string" />
    

    output:

    appCurrDpId
    appCustomerCapable
    appDecision
    appCountry
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wsdl file and a detailed document about all the elements in
I have a WSDL which I need to trigger some commands from. I need
I have a wsdl file and i am trying to call it from a
I have some WSDL from which I need to generate a web service implementation.
I have a WSDL from a webservice for which I don't have the implementation.
We have a WSDL which contains the following type definition: ... <xsd:complexType name=OrderItem> <xsd:all>
I have a WSDL which contains 3 schemas inside it's types element. The schemas
I have a WSDL 1.1 file which describes my Web Service. Now I need
I have this in some WSDL: <element name="startDate" type="xsd:dateTime"/> <element name="endDate" type="xsd:dateTime"/> Which results
I have a WSDL script which has the following format <definitions name=ProcessData targetNamespace=urn:ProcessData> <message

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.