Recent Changes - Search:

PmWiki

pmwiki.org

edit SideBar

RegularExpressions

Main.RegularExpressions History

Hide minor edits - Show changes to markup

February 19, 2014, at 08:33 PM by 204.101.2.194 -
Added lines 7-10:

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

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

February 10, 2010, at 08:45 PM by 192.28.0.20 -
Added lines 1-2:

(See also RegExp.)

February 10, 2010, at 08:45 PM by 192.28.0.20 -
Added lines 1-4:

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'/

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