Regex - why does this work? (problem with wildcard usage)

Regex - why does this work? (problem with wildcard usage)

bsukbsuk Posts: 83Questions: 22Answers: 2
edited March 21 in General

I'm trying to understand why this is returning a result. Am I missing something with my understanding of regular expression, or is it a DataTables setting/browser issue that I'm not aware of?

I would expect Integ* to return a result, but it seems to be ignoring the final character?

( Reproducable at: https://datatables.net/examples/api/regex.html )

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 9,177Questions: 0Answers: 1,533
    Answer ✓

    Yep, that's behaving as expected - see here - you've got to trust Wikipedia ;)

    • The asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches "ac", "abc", "abbc", "abbbc", and so on.

    Colin

Sign In or Register to comment.