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

Notifications

Announcements

No record found.

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,160 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
    237,803 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans