Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

RegularExpressions

(See also RegExp.)

Modify all lines that have a third column starting with 'Y' to 'R', where columns are defined by tabs, and do the replacement at most once per line.

1,$s/\(^[^ ]* [^ ]* \)'Y'/\1'R'/

Match all locations in a number where a comma should be placed.

(?<=\\d)(?=(\\d\\d\\d)+$) $num =~ s/(?<=\\d)(?=(\\d\\d\\d)+$)/,/g;

Edit - History - Print - Recent Changes - Search
Page last modified on February 19, 2014, at 08:33 PM