@@ -40,8 +40,7 @@ class ActionObject
4040 const ACTION_ATTRIBUTE_URL = 'url ' ;
4141 const ACTION_ATTRIBUTE_SELECTOR = 'selector ' ;
4242 const ACTION_ATTRIBUTE_VARIABLE_REGEX_PARAMETER = '/\(.+\)/ ' ;
43- const ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN = '/{{[\w]+\.?[\w\[\]]+}}/ ' ;
44- const ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN_WITH_PARAMS = '/{{[\w]+\.[\w]+\(.+\)}}/ ' ;
43+ const ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN = '/({{[\w]+\.?[\w\[\]]+}})|({{[\w]+\.[\w]+\(.+\)}})/ ' ;
4544
4645 /**
4746 * The unique identifier for the action
@@ -444,7 +443,7 @@ private function stripAndReturnParameters($reference)
444443 private function findAndReplaceReferences ($ objectHandler , $ inputString )
445444 {
446445 //look for parameter area, if so use different regex
447- $ regex = $ this -> resolveRegexPatternForReference ( $ inputString ) ;
446+ $ regex = ActionObject:: ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN ;
448447
449448 preg_match_all ($ regex , $ inputString , $ matches );
450449
@@ -514,20 +513,6 @@ private function validateUrlAreaAgainstActionType($obj)
514513 }
515514 }
516515
517- /**
518- * Determines whether the given $inputString has (params), and returns the appropriate regex for use in matching.
519- * @param string $inputString
520- * @return string
521- */
522- private function resolveRegexPatternForReference ($ inputString )
523- {
524- if (preg_match (ActionObject::ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN_WITH_PARAMS , $ inputString ) === 1 ) {
525- return ActionObject::ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN_WITH_PARAMS ;
526- } else {
527- return ActionObject::ACTION_ATTRIBUTE_VARIABLE_REGEX_PATTERN ;
528- }
529- }
530-
531516 /**
532517 * Gets the object's dataByName with given $match, differentiating behavior between <array> and <data> nodes.
533518 * @param string $obj
0 commit comments