I'm trying to match the entire string when I have identified the middle part.
I have the string:
first:second:third:forth:fifth
I wish to match it when I write for example: :third:
I do not wish to match it when I write for example :sixth:
I've figured out the first half, been looking around for the regex to extend to include any character after the match.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.