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 9296163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:46:26+00:00 2026-06-18T21:46:26+00:00

Dim rc As Boolean = 2 Like *?<*? I don’t understand why rc equals

  • 0
Dim rc As Boolean = "2" Like "*?<*?"

I don’t understand why rc equals True, surely 2 is not like *?<*? at all.

The above pattern requires a string with

  • At least three characters (two ?’s and a <)
  • where the < symbol is somewhere on the interior.

As far as I can work out < is not a special character that means something other than < to the Like operator.

Using Visual Studio 2010.

  • 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-06-18T21:46:27+00:00Added an answer on June 18, 2026 at 9:46 pm

    While I can’t directly explain why 2 is like "*?<*?".

    Your query reads;

    • * – Match 0 or more characters
    • ? – Followed by one single character
    • < – Followed by the < character
    • * – Followed by 0 or more characters
    • ? – Terminated by one single character

    For your logic you want;

    at least three characters before it matches, with “<” occurring
    somewhere on the interior of the string

    Which results in a query of;

    Dim rc As Boolean = "2" Like "???*<*"
    

    Which reads;

    • ??? – Match at least 3 characters
    • * – Followed by any number of further characters
    • < – Followed by the < character
    • * – Followed by any number of further characters

    Not a direct answer I know, but I hope it helps all the same…

    EDIT:

    To answer your comment below.

    You would like to;

    find a string which has a “<” in it somewhere with at least one character on either side

    Which results in a query of;

    Dim rc As Boolean = "2" Like "*?<?*"
    

    This would return False as a result, as would;

    Dim rc As Boolean = "<" Like "*?<?*"
    

    However;

    Dim rc As Boolean = "2<2" Like "*?<?*"
    

    Would return true.

    I hope this helps (more!)

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

Sidebar

Related Questions

dim dataType as String toolTip=Marks And Number[String] I want to get the [String] alone.
Dim insert_coupon_query As String = (INSERT INTO qa_discountcoupons (id, status_code) VALUES (AUTO_INCREMENT_ID, 5)) Dim
Dim CustID As String = txtSrchCustID.Text Dim FirstName As String = txtNewCustFName.Text Dim SecondName
In a case where you would like to reset an array of boolean values
Public Function Validate(updatedDetailList As List(Of DetailVO)) As Boolean Dim matchFound As Boolean = False
I have some sample webservice like below, <WebMethod()> _ Public Function ExecuteCMD() As Boolean
I am trying to do something like this: Public Sub (ByVal boolTest As Boolean)
In VB.NET, you can instantiate and immediately use an array like this: Dim b
I found this function on a web Private Function FileFolderExists(strFullPath As String) As Boolean
Dim dtmStart As Date, dtmEnd As Date, dblDuration As Double dtmStart = 1900/01/01 08:10:00

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.