Questions about regular expressions.
■ Overview
"Well, after abc, it's def."
Please tell me the regular expression string to match the def of the above sentence.
■ Logic
***LOL I want to extract the "last" half-width alphanumeric characters that exist in
***
of .
■ Current regular expression string
([0-9a-zA-Z!-~]+)(.*)(lol)
■ Match results for current regular expression string
Match string: after abc is def lol
Match string group 1: abc
Match string group 2: Next to def
Match String Group 3: LOL
■Contents of questions
one of the above groups has def
Please tell me the regular expression string.
The point is "last".
[0-9a-zA-Z!-~]+)(.*)(lol)
(.*)
above is the negation of [0-9a-zA-Z!-~]
([^0-9a-zA-Z!-~]*) Why don't you change it to ?
© 2024 OneMinuteCode. All rights reserved.