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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:15:40+00:00 2026-05-31T15:15:40+00:00

I have 3 rules which are strings like ‘483??’, ‘48310* ‘, ’48 *’ and

  • 0

I have 3 rules which are strings like ‘483??’, ‘48310*‘, ’48*’ and I have a source string ‘483102334’ that has to be matched with the above rules to find a rule that matches the closest. In this example the closest match rule is ‘48310*’ since it matches with most number of digits in my source string. I want to acheive this in PL/SQL. Please 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-31T15:15:41+00:00Added an answer on May 31, 2026 at 3:15 pm

    Something like this will work for the sample data you’ve provided. If you want ‘?’ to be treated differently than ‘*’, however, you’ll have to provide a bit more detail.

    SQL> ed
    Wrote file afiedt.buf
    
      1  with x as (
      2    select '483??' pattern from dual union all
      3    select '48310' pattern from dual union all
      4    select '48*' pattern from dual
      5  )
      6  select pattern
      7    from (
      8        select pattern,
      9               rank() over (order by utl_match.edit_distance( pattern, '483102334' )) rnk
     10          from x)
     11*  where rnk = 1
    SQL> /
    
    PATTE
    -----
    48310
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data structure that represents C# code like this: class Namespace: string
I have several strings that look like the following: +H124005992014011/1527399999999I05Z +H7039700000001/$99999999I051 +K122005962050171/120911234C117 I need
question related to this I have a string a\;b\\;c;d which in Java looks like
I have a url that looks like this www.myurl.com/page/blog which works fine with my
Rules like A parent object will have up to 2 children could be enforced
So, say I have a string to parse with a given format that maps
I have an ASP.NET website in which I am loading some validation rules from
I have a method to generate fully qualified URLs that I wrote which I
Apologies if this has been asked before. I have some data which I need
So I have a UTF-8 encoded string which can contain full-width kanji, full-width kana,

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.