Guest User

Untitled

a guest
Nov 19th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. # Name grouping and replacement
  2.  
  3. Named group is formed with `(?<name>)`.
  4. Captured text can be inserted in result using `$+{name}`.
  5.  
  6. Example text: `<foo><bar>Hello</bar> <baz>World!</baz></foo>`
  7. In the regex: `<foo><bar>(?<message>.+)</bar> <baz>(?<object>.+)</baz></foo>`
  8. Replace by: `<message object="$+{object}">$+{message}</message>`
Add Comment
Please, Sign In to add comment