web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Match function with several universal characters

(0) ShareShare
ReportReport
Posted on by 59

Hi :)
I'm looking for function similar to "match" where question mark, or something like that, can replace any number of characters. 

To be more specific, if I use that:

match("a?c", "abc") it will return true, but if i use that:
match("a?c", "abbc") it will return false.

I'm searching for function that will return true on second case too.  

My only idea is that I could create loop and in every step add one more question mark and execute match function, but it would be inefficient on large strings and very complicated on strings with more than one question mark like "a?c?e".

Is there any solution for my problem? I haven't found anything that could help mi with that. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,172 Moderator on at

    Match function is the one you should use but your regular expression is wrong. "?" In regex means exactly one wildcard character.

    So you just need to use the correct regular expression.

    Please check this page for more help with regular expressions: [View:https://regular-expressions.mobi/anchors.html?wlr=1]

  • Suggested answer
    Martin Dráb Profile Picture
    239,399 Most Valuable Professional on at

    I don't know which resources you've consulted, but you probably probably missed the documentation for match() function.

    For instance: An expression that is followed by a plus sign (+) requires a match for one or more occurrences of the preceding expression.

  • Patryk Mi Profile Picture
    59 on at

    Thank you Crispin, it's work perfectly for me. Thank you very much!

    I've been searching for function and simply forgot about "like". Shame on me :(

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans