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

  • Home
  • SEARCH
  • 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 6346159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:57:50+00:00 2026-05-24T20:57:50+00:00

I have the following conditions for my regex : When the string is not

  • 0

I have the following conditions for my regex :
When the string is not empty it should contain the word “internal”

So in other words :

"<link linktype='internal' id='{F88AE8AE-69C4-4E31-95BF-73B110FEE63A}' />" --> OK
"<link linktype='external' id='{F88AE8AE-69C4-4E31-95BF-73B110FEE63A}' />" --> NOK
"test" --> NOK
"" --> OK

I know that an empty string can be checked with : ^$
Or a non empty string with : ^\s*\S
and my internal check simply as : linktype=\'internal\' (for example)

Bringing them together is the hard part. I’ve been stuck on this, but it doesn’t do as expected :

(?(?=^\s*\S)linktype=\"internal\"|^$)

Can anyone help ?

  • 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-24T20:57:52+00:00Added an answer on May 24, 2026 at 8:57 pm

    You could try (^$)|(^.*linktype=\"internal\".*$)

    Either the empty string, or a string with the text linktype="internal".

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a <asp:regularexpressionvalidator> with following conditions: String must be have 8
I have following statement for query articles from some sections Article.all(:joins => :sections, :conditions
I have the following named scope: named_scope :report_search, lambda { |search| { :conditions =>
If I have the following named_scope named_scope :scope_by_user_id, lambda {|user_id| {:conditions => [comments.user_id =
I am trying to match the following string in Javascript Regex PC123456 This is
I have the following conditions in my .htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} ^ex\.co$
Good morning. I have the following conditions in radiobutton <td> @Html.RadioButtonFor(model => model.ImagensSelecionadas, new
I want to validate a string to meet the following conditions: Must be 6
I have the following conditions for a model that finds a list of subjects:
I have following question. I DO THIS: @inquiry = Survey::Inquiry.find(:all, :conditions => [respondent_id =

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.