Skip to content

Commit

Permalink
Grammar: Replace \w to allow _ in regex replace
Browse files Browse the repository at this point in the history
This allows using `_` as a delimiter as such:

```perl
$asd =~ s_a_v_g;
```
  • Loading branch information
Fank authored and infininight committed Mar 21, 2015
1 parent 41e8542 commit 95e4206
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Syntaxes/Perl.plist
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@
</dict>
<dict>
<key>begin</key>
<string>\b(?=s([^\s\w\[({&lt;]).*\1([egimosxradlupc]*)([\}\)\;\,]|\s+))</string>
<string>\b(?=s([^\sa-zA-Z0-9\[({&lt;]).*\1([egimosxradlupc]*)([\}\)\;\,]|\s+))</string>
<key>comment</key>
<string>string.regexp.replaceXXX</string>
<key>end</key>
Expand All @@ -662,7 +662,7 @@
<array>
<dict>
<key>begin</key>
<string>(s\s*)([^\s\w\[({&lt;])</string>
<string>(s\s*)([^\sa-zA-Z0-9\[({&lt;])</string>
<key>captures</key>
<dict>
<key>0</key>
Expand Down Expand Up @@ -715,7 +715,7 @@
</dict>
<dict>
<key>begin</key>
<string>([^\s\w\[({&lt;])</string>
<string>([^\sa-zA-Z0-9\[({&lt;])</string>
<key>captures</key>
<dict>
<key>0</key>
Expand Down

0 comments on commit 95e4206

Please sign in to comment.