[Solved] Regex take part of string after another part [closed]


yourPrefix([a-zA-Z0-9]+)

Matches any alphabetic/numeric characters after ‘yourPrefix’

For your example data in javascript:

  '[BBSHORTCODE_LINK'.match('BBSHORTCODE_([a-zA-Z0-9]+)').pop() //'LINK'
'[BBSHORTCODE_BUTTON'.match('BBSHORTCODE_([a-zA-Z0-9]+)').pop() //'BUTTON'

solved Regex take part of string after another part [closed]