Regex capture group4/7/2023 ![]() ![]() ' apples and mangoes'.replace(/\/g, '$1') ' apples and mangoes'.replace(/\/g, '$3') within regexp definition, use \1, \2, etc to refer to the corresponding capture group // remove square brackets that surround digit characters.$' gives string after the matched portion.$` gives string before the matched portion.in replacement section, use $
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |