Is there any inbuild function to find out the last occurrence of a string pattern in a string in action script .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, check out the lastIndexOf method of the String object.
PS. If by string pattern you mean a regular expression rather than a literal string, you could use the match method instead, passing a RegExp and setting the
g(global) flag; then you could check the last match in the returned result.