Home >Backend Development >PHP Tutorial >PHP function to escape regular expression characters
Results : /\d{3}(\-\d{4})/ Example 2,
Results: /\d{3}(\-\d{4})/ The main difference between the above two examples: It’s the “3” in the red area. In the second example, “3” is also escaped. |