Regular Expressions 101

Save & Share

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET 7.0 (C#)
  • Rust
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests

Tools

Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Match everything enclosed
    (?:...)
  • Capture everything enclosed
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression

/
/
g

Test String

Code Generator

Generated Code

$re = '/((?<User>[a-zA-Z0-9-_+]+)\s+(?<PID>\d{1,10000}+)\s+(?<CPU>\d+\.\d+)\s+(?<Memory>\d+\.\d+)\s+(?<VSZ>\d{1,10000})\s+(?<RSS>\d{1,10000}+)\s+(?<TTY>[a-zA-Z0-9\/\?]+)\s+(?<Stat>[a-zA-Z0-9\+\-\<\>]+)\s+(?<START>(?<StartDate>(?<StartMonth>[a-zA-Z]+)(?<StartDay>\d+))|(?<StartTime>(?<StartHour>\d+)\:(?<StartMinute>\d+)))\s+(?<TIME>(?<Hours>\d+)\:(?<Minutes>\d+))\s+(?<Command>.*\R+))/'; $str = 'USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 46368 9036 ? Ss Apr06 1:33 /usr/lib/systemd/systemd --switched-root --system --deserialize 21 root 2 0.0 0.0 0 0 ? S Apr06 0:01 [kthreadd] root 3 0.0 0.0 0 0 ? S Apr06 0:14 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S< Apr06 0:00 [kworker/0:0H] root 7 0.0 0.0 0 0 ? S Apr06 0:01 [migration/0] root 8 0.0 0.0 0 0 ? S Apr06 0:00 [rcu_bh] root 9 0.0 0.0 0 0 ? S Apr06 0:00 [rcuob/0] root 10 0.0 0.0 0 0 ? S Apr06 0:00 [rcuob/1] root 11 0.1 0.0 0 0 ? S Apr06 71:01 [rcu_sched] root 12 0.0 0.0 0 0 ? S Apr06 21:43 [rcuos/0] root 13 0.1 0.0 0 0 ? S Apr06 51:46 [rcuos/1] root 14 0.0 0.0 0 0 ? S Apr06 0:05 [watchdog/0] root 15 0.0 0.0 0 0 ? S Apr06 0:04 [watchdog/1] root 16 0.0 0.0 0 0 ? S Apr06 0:01 [migration/1] root 17 0.0 0.0 0 0 ? S Apr06 0:31 [ksoftirqd/1] root 20 0.0 0.0 0 0 ? S< Apr06 0:00 [khelper] root 21 0.0 0.0 0 0 ? S Apr06 0:00 [kdevtmpfs] root 22 0.0 0.0 0 0 ? S< Apr06 0:00 [netns] root 23 0.0 0.0 0 0 ? S< Apr06 0:00 [perf] root 24 0.0 0.0 0 0 ? S< Apr06 0:00 [writeback] root 25 0.0 0.0 0 0 ? S< Apr06 0:00 [kintegrityd] root 26 0.0 0.0 0 0 ? S< Apr06 0:00 [bioset] root 27 0.0 0.0 0 0 ? S< Apr06 0:00 [kblockd] root 28 0.0 0.0 0 0 ? S< Apr06 0:00 [md] root 33 0.0 0.0 0 0 ? S Apr06 0:01 [khungtaskd] root 34 0.0 0.0 0 0 ? S Apr06 0:00 [kswapd0] root 35 0.0 0.0 0 0 ? SN Apr06 0:00 [ksmd] root 37 0.0 0.0 0 0 ? S Apr06 0:00 [fsnotify_mark] root 38 0.0 0.0 0 0 ? S< Apr06 0:00 [crypto] root 46 0.0 0.0 0 0 ? S< Apr06 0:00 [kthrotld] root 48 0.0 0.0 0 0 ? S< Apr06 0:00 [kmpath_rdacd] root 49 0.0 0.0 0 0 ? S< Apr06 0:00 [kpsmoused] root 51 0.0 0.0 0 0 ? S< Apr06 0:00 [ipv6_addrconf] root 71 0.0 0.0 0 0 ? S< Apr06 0:00 [deferwq] root 101 0.0 0.0 0 0 ? S Apr06 0:03 [kauditd] root 264 0.0 0.0 0 0 ? S< Apr06 0:00 [ata_sff] root 265 0.0 0.0 0 0 ? S Apr06 0:00 [scsi_eh_0] root 267 0.0 0.0 0 0 ? S< Apr06 0:00 [events_power_ef] root 268 0.0 0.0 0 0 ? S< Apr06 0:00 [scsi_tmf_0] root 269 0.0 0.0 0 0 ? S Apr06 0:00 [scsi_eh_1] root 271 0.0 0.0 0 0 ? S< Apr06 0:00 [scsi_tmf_1] root 273 0.0 0.0 0 0 ? S< Apr06 0:00 [mpt_poll_0] root 274 0.0 0.0 0 0 ? S< Apr06 0:00 [mpt/0] root 282 0.0 0.0 0 0 ? S Apr06 0:00 [scsi_eh_2] root 283 0.0 0.0 0 0 ? S< Apr06 0:00 [scsi_tmf_2] root 285 0.0 0.0 0 0 ? S< Apr06 0:00 [ttm_swap] root 311 0.0 0.0 0 0 ? S< Apr06 0:02 [kworker/0:1H] rblanch+ 347 0.0 0.0 128296 2612 pts/65 Ss+ Apr07 0:00 -/bin/bash root 358 0.0 0.0 0 0 ? S< Apr06 0:00 [kdmflush] root 359 0.0 0.0 0 0 ? S< Apr06 0:00 [bioset] root 361 0.0 0.0 0 0 ? S< Apr06 0:00 [kdmflush] root 363 0.0 0.0 0 0 ? S< Apr06 0:00 [bioset] root 380 0.0 0.0 0 0 ? S< Apr06 0:00 [xfsalloc] root 381 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs_mru_cache] root 382 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs-buf/dm-1] root 383 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs-data/dm-1] root 384 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs-conv/dm-1] root 385 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs-cil/dm-1] root 386 0.0 0.0 0 0 ? S Apr06 2:32 [xfsaild/dm-1] rblanch+ 429 0.0 0.0 128296 2612 pts/66 Ss+ Apr07 0:00 -/bin/bash root 460 0.0 0.2 134892 86468 ? Ss Apr06 0:45 /usr/lib/systemd/systemd-journald root 466 0.0 0.0 0 0 ? S< Apr06 0:00 [rpciod] root 483 0.0 0.0 202868 23756 ? Ss Apr06 2:47 /usr/sbin/lvmetad -f root 498 0.0 0.0 46536 5308 ? Ss Apr06 0:00 /usr/lib/systemd/systemd-udevd rblanch+ 505 0.0 0.0 128296 2612 pts/67 Ss+ Apr07 0:00 -/bin/bash rblanch+ 578 0.0 0.0 128296 2612 pts/68 Ss+ Apr07 0:00 -/bin/bash root 649 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs-buf/sda1] root 650 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs-data/sda1] root 651 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs-conv/sda1] root 652 0.0 0.0 0 0 ? S< Apr06 0:00 [xfs-cil/sda1] root 654 0.0 0.0 0 0 ? S Apr06 0:00 [xfsaild/sda1] root 684 0.0 0.0 116744 1816 ? S<sl Apr06 0:12 /sbin/auditd -n root 706 0.0 0.0 19304 1264 ? Ss Apr06 7:01 /usr/sbin/irqbalance --foreground root 707 0.0 0.1 546788 55432 ? Ssl Apr06 0:10 /usr/sbin/rsyslogd -n root 709 0.0 0.0 254528 12516 ? Ss Apr06 26:02 /usr/bin/vmtoolsd root 711 0.0 0.0 323588 23308 ? Ssl Apr06 0:04 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid dbus 714 0.0 0.0 45288 2080 ? Ssl Apr06 0:31 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation root 722 0.0 0.0 203352 1244 ? Ssl Apr06 0:02 /usr/sbin/gssproxy -D root 748 0.0 0.0 6540 264 ? Ss Apr06 0:00 /usr/sbin/mcelog --ignorenodev --daemon --syslog root 750 0.0 0.0 4336 536 ? Ss Apr06 0:00 /usr/sbin/acpid ntp 751 0.0 0.0 39588 2080 ? Ss Apr06 1:08 /usr/sbin/ntpd -u ntp:ntp -g root 756 0.0 0.0 42216 1184 ? Ss Apr06 0:00 /usr/sbin/rpc.gssd root 757 0.0 0.0 333748 3212 ? Ss Apr06 1:03 /usr/sbin/sssd -D -f root 758 1.1 1.3 987960 452764 ? S Apr06 500:04 /usr/libexec/sssd/sssd_be --domain corp.nephila.com --uid 0 --gid0 --debug-to-files rblanch+ 789 0.0 0.7 371916 235272 ? Ss Apr07 0:39 SCREEN -S OS-prd-hx rblanch+ 790 0.0 0.0 128296 2616 pts/70 Ss+ Apr07 0:00 -/bin/bash root 818 0.0 0.1 359048 65432 ? S Apr06 0:36 /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --debug-to-files root 819 0.0 0.0 317584 4688 ? S Apr06 0:23 /usr/libexec/sssd/sssd_pam --uid 0 --gid 0 --debug-to-files root 836 0.0 0.0 36692 1800 ? Ss Apr06 0:29 /usr/lib/systemd/systemd-logind root 840 0.0 0.0 126332 1708 ? Ss Apr06 0:11 /usr/sbin/crond -n root 841 0.0 0.0 25960 968 ? Ss Apr06 0:00 /usr/sbin/atd -f rblanch+ 868 0.0 0.0 128296 2608 pts/71 Ss+ Apr07 0:00 -/bin/bash rblanch+ 939 0.0 0.0 128296 2612 pts/72 Ss+ Apr07 0:00 -/bin/bash rblanch+ 1010 0.0 0.0 128296 2616 pts/73 Ss+ Apr07 0:00 -/bin/bash rblanch+ 1081 0.0 0.0 128296 2612 pts/74 Ss+ Apr07 0:00 -/bin/bash root 1127 0.0 0.0 0 0 ? S May03 0:00 [kworker/0:1] rblanch+ 1152 0.0 0.0 128296 2612 pts/75 Ss+ Apr07 0:00 -/bin/bash root 1183 0.0 0.0 0 0 ? S May03 0:11 [kworker/0:0] rblanch+ 1224 0.0 0.0 128296 2608 pts/76 Ss+ Apr07 0:00 -/bin/bash rblanch+ 1297 0.0 0.0 128296 2616 pts/77 Ss+ Apr07 0:00 -/bin/bash root 1318 0.0 0.0 110516 13124 ? Ss Apr06 0:00 /sbin/dhclient -H vp-linad01 -1 -q -lf /var/lib/dhclient/dhclient-478dd68a-23db-4e5b-bb11-b3e1a4d8a827-et h3.lease -pf /var/run/dhclient-eth3.pid eth3 root 1320 0.0 0.0 0 0 ? S 07:36 0:00 [kworker/1:0] polkitd 1331 0.0 0.0 540524 10888 ? Ssl Apr06 0:07 /usr/lib/polkit-1/polkitd --no-debug rblanch+ 1381 0.0 0.0 128296 2612 pts/78 Ss+ Apr07 0:00 -/bin/bash root 1388 0.0 0.0 553036 16356 ? Ssl Apr06 3:57 /usr/bin/python -Es /usr/sbin/tuned -l -P root 1389 0.4 0.0 1043468 10528 ? SLsl Apr06 197:23 /usr/sbin/collectd -C /etc/collectd.conf -f root 1392 0.0 0.0 223332 11308 ? Ss Apr06 14:29 /usr/sbin/snmpd -LS0-6d -f root 1393 0.0 0.0 82552 3604 ? Ss Apr06 0:11 /usr/sbin/sshd -D root 1398 0.0 0.0 30672 2032 ? Ss Apr06 0:00 /usr/sbin/oddjobd -n -p /var/run/oddjobd.pid -t 300 rblanch+ 1468 0.0 0.0 128296 2616 pts/79 Ss+ Apr07 0:00 -/bin/bash root 1484 0.0 0.0 110032 860 tty1 Ss+ Apr06 0:00 /sbin/agetty --noclear tty1 linux rblanch+ 1540 0.0 0.0 128296 2608 pts/80 Ss+ Apr07 0:00 -/bin/bash rblanch+ 1615 0.0 0.0 128296 2612 pts/81 Ss+ Apr07 0:00 -/bin/bash rblanch+ 1686 0.0 0.0 128296 2608 pts/82 Ss+ Apr07 0:00 -/bin/bash rblanch+ 1757 0.0 0.0 128296 2612 pts/83 Ss+ Apr07 0:00 -/bin/bash root 1827 0.0 0.0 93216 2204 ? Ss Apr06 0:14 /usr/libexec/postfix/master -w rblanch+ 1830 0.0 0.0 128296 2608 pts/84 Ss+ Apr07 0:00 -/bin/bash postfix 1902 0.0 0.0 103660 4096 ? S Apr06 0:03 qmgr -l -t unix -u rblanch+ 1903 0.0 0.0 128296 2612 pts/85 Ss+ Apr07 0:00 -/bin/bash rblanch+ 1974 0.0 0.0 128296 2608 pts/86 Ss+ Apr07 0:00 -/bin/bash root 2217 0.0 0.0 0 0 ? S 07:36 0:00 [kworker/u4:0] root 2724 0.0 0.0 0 0 ? S< Apr06 0:00 [cifsiod] root 2762 0.0 0.0 0 0 ? S Apr06 0:40 [cifsd] rblanch+ 2878 0.0 0.5 322768 186152 ? Ss Apr06 1:01 SCREEN -S dev rblanch+ 2944 0.0 0.0 128608 2988 pts/117 Ss May03 0:00 -/bin/bash rblanch+ 2969 0.0 0.0 128428 2828 pts/2 Ss Apr06 0:00 -/bin/bash rblanch+ 3000 0.0 0.0 88928 4016 pts/114 S+ Apr20 0:01 ssh -A vp-onestore-qa1-08 rblanch+ 3037 0.0 0.0 88932 4024 pts/117 S+ May03 0:00 ssh -A vp-onestore01 rblanch+ 3057 0.0 0.0 128296 2640 pts/3 Ss Apr06 0:00 -/bin/bash rblanch+ 3140 0.0 0.0 128748 3128 pts/4 Ss+ Apr06 0:15 -/bin/bash rblanch+ 3301 0.0 0.0 128296 2608 pts/6 Ss Apr06 0:00 -/bin/bash rblanch+ 3401 0.0 0.0 128424 2808 pts/7 Ss Apr06 0:00 -/bin/bash rblanch+ 3483 0.0 0.0 128296 2608 pts/8 Ss Apr06 0:00 -/bin/bash root 3918 0.0 0.0 204480 6608 ? Ss 10:11 0:00 sshd: rblanchard [priv] rblanch+ 3957 0.0 0.0 206164 4708 ? S 10:11 0:01 sshd: rblanchard@pts/10 rblanch+ 3958 0.0 0.0 128580 2956 pts/10 Ss 10:11 0:00 -bash rblanch+ 3969 0.0 0.0 128296 2640 pts/9 Ss Apr06 0:00 -/bin/bash rblanch+ 4050 0.0 0.0 88784 4056 pts/9 S+ Apr06 0:01 ssh vp-nexusrm01 rblanch+ 4162 0.0 0.0 137948 1212 pts/10 S+ 10:11 0:00 screen -U -d -R dev rblanch+ 4218 0.0 0.0 89988 5316 pts/8 S+ Apr06 0:03 ssh vp-logstash01 root 6040 0.0 0.0 204516 6712 ? SLs 12:49 0:00 sshd: admin_nferguson [priv] root 6052 0.0 0.0 0 0 ? S 12:49 0:00 [cifsd] admin_n+ 6090 0.0 0.0 204516 2840 ? S 12:49 0:00 sshd: admin_nferguson@pts/28 admin_n+ 6091 0.0 0.0 127832 2156 pts/28 Ss+ 12:49 0:00 -bash root 6141 0.0 0.0 0 0 ? S 12:50 0:01 [kworker/1:1] postfix 6256 0.0 0.0 103488 3848 ? S 12:55 0:00 pickup -l -t unix -u rblanch+ 6261 0.0 0.0 164088 5508 pts/1 S+ 12:55 0:00 vim -X nxlog.conf root 6356 0.0 0.0 0 0 ? S< 13:03 0:00 [kworker/1:1H] root 6390 0.0 0.0 0 0 ? S< 13:08 0:00 [kworker/1:2H] root 6495 0.0 0.0 0 0 ? S< 13:15 0:00 [kworker/1:0H] root 6517 4.6 0.0 204460 6640 ? SLs 13:19 0:00 sshd: admin_nferguson [priv] root 6523 0.0 0.0 46536 2956 ? S 13:19 0:00 /usr/lib/systemd/systemd-udevd root 6560 0.0 0.0 0 0 ? D 13:19 0:00 [cifsd] root 6561 0.0 0.0 0 0 ? D 13:19 0:00 [cifsd] admin_n+ 6563 0.0 0.0 204608 2916 ? S 13:19 0:00 sshd: admin_nferguson@notty admin_n+ 6564 0.0 0.0 57716 1748 ? Rs 13:19 0:00 ps -aux rblanch+ 6862 0.0 0.7 376212 239568 ? Ss Apr06 0:04 SCREEN -S OS-prd-vp rblanch+ 6863 0.0 0.0 128296 2608 pts/11 Ss Apr06 0:00 -/bin/bash rblanch+ 6962 0.0 0.0 128296 2612 pts/12 Ss Apr06 0:00 -/bin/bash rblanch+ 7045 0.0 0.0 128296 2608 pts/13 Ss Apr06 0:00 -/bin/bash rblanch+ 7127 0.0 0.0 128296 2604 pts/14 Ss Apr06 0:00 -/bin/bash rblanch+ 7210 0.0 0.0 128296 2608 pts/15 Ss Apr06 0:00 -/bin/bash rblanch+ 7292 0.0 0.0 128296 2608 pts/16 Ss Apr06 0:00 -/bin/bash rblanch+ 7374 0.0 0.0 128296 2608 pts/17 Ss Apr06 0:00 -/bin/bash rblanch+ 7457 0.0 0.0 128296 2612 pts/18 Ss Apr06 0:00 -/bin/bash rblanch+ 7539 0.0 0.0 128296 2608 pts/19 Ss Apr06 0:00 -/bin/bash rblanch+ 7621 0.0 0.0 128296 2608 pts/20 Ss Apr06 0:00 -/bin/bash rblanch+ 7704 0.0 0.0 128296 2608 pts/21 Ss Apr06 0:00 -/bin/bash rblanch+ 7786 0.0 0.0 128296 2608 pts/22 Ss Apr06 0:00 -/bin/bash rblanch+ 7868 0.0 0.0 128296 2608 pts/23 Ss Apr06 0:00 -/bin/bash rblanch+ 7951 0.0 0.0 128296 2608 pts/24 Ss Apr06 0:00 -/bin/bash rblanch+ 8033 0.0 0.0 128296 2604 pts/25 Ss Apr06 0:00 -/bin/bash rblanch+ 8115 0.0 0.0 128296 2604 pts/26 Ss Apr06 0:00 -/bin/bash rblanch+ 8197 0.0 0.0 128296 2608 pts/27 Ss Apr06 0:00 -/bin/bash rblanch+ 8375 0.0 0.7 376628 240132 ? Ss Apr06 0:08 SCREEN -S OS-uat-vp rblanch+ 8376 0.0 0.0 128296 2608 pts/29 Ss Apr06 0:00 -/bin/bash rblanch+ 8476 0.0 0.0 128296 2608 pts/30 Ss Apr06 0:00 -/bin/bash rblanch+ 8557 0.0 0.0 128296 2608 pts/31 Ss Apr06 0:00 -/bin/bash rblanch+ 8640 0.0 0.0 128296 2608 pts/32 Ss Apr06 0:00 -/bin/bash rblanch+ 8722 0.0 0.0 128296 2604 pts/33 Ss Apr06 0:00 -/bin/bash root 8795 0.0 0.0 204460 6608 ? Ss Apr25 0:01 sshd: rblanchard [priv] rblanch+ 8804 0.0 0.0 128296 2608 pts/34 Ss Apr06 0:00 -/bin/bash rblanch+ 8834 0.0 0.0 204860 3896 ? S Apr25 0:13 sshd: rblanchard@pts/0 rblanch+ 8835 0.0 0.0 128416 2840 pts/0 Ss+ Apr25 0:00 -bash rblanch+ 8886 0.0 0.0 128296 2604 pts/35 Ss Apr06 0:00 -/bin/bash rblanch+ 8969 0.0 0.0 128296 2604 pts/36 Ss Apr06 0:00 -/bin/bash rblanch+ 9051 0.0 0.0 128296 2608 pts/37 Ss Apr06 0:00 -/bin/bash rblanch+ 9160 0.0 0.0 128296 2604 pts/38 Ss Apr06 0:00 -/bin/bash rblanch+ 9268 0.0 0.0 128296 2608 pts/39 Ss Apr06 0:00 -/bin/bash rblanch+ 9349 0.0 0.0 128296 2608 pts/40 Ss Apr06 0:00 -/bin/bash rblanch+ 9431 0.0 0.0 128296 2604 pts/41 Ss Apr06 0:00 -/bin/bash rblanch+ 9514 0.0 0.0 128428 2812 pts/42 Ss Apr06 0:00 -/bin/bash rblanch+ 9596 0.0 0.0 128296 2608 pts/43 Ss Apr06 0:00 -/bin/bash rblanch+ 9677 0.0 0.0 128296 2612 pts/44 Ss Apr06 0:00 -/bin/bash rblanch+ 9759 0.0 0.0 128296 2604 pts/45 Ss Apr06 0:00 -/bin/bash rblanch+ 10174 0.0 0.0 164388 6036 pts/1 T May02 0:00 vim -X osv2.sh rblanch+ 10825 0.0 0.0 86704 3876 pts/3 S+ Apr27 0:00 ssh hx-kickstart01 rblanch+ 11078 0.0 0.0 86708 3956 pts/42 S+ Apr22 0:01 ssh -A 10.5.8.96 rblanch+ 11179 0.0 0.0 86852 3984 pts/6 S+ Apr25 0:01 ssh vp-influxdb01 postfix 12084 0.0 0.0 103496 3980 ? S Apr06 0:00 tlsmgr -l -t unix -u rblanch+ 12435 0.0 0.1 179060 42476 ? Ss Apr06 0:00 SCREEN -S ilo rblanch+ 12436 0.0 0.0 128296 2640 pts/47 Ss Apr06 0:00 -/bin/bash rblanch+ 12525 0.0 0.0 86404 3668 pts/47 S+ Apr06 0:01 ssh -A administrator@10.5.3.40 rblanch+ 12527 0.0 0.0 128296 2616 pts/48 Ss Apr06 0:00 -/bin/bash rblanch+ 12624 0.0 0.0 86404 3668 pts/48 S+ Apr06 0:01 ssh -A administrator@10.5.3.41 rblanch+ 12625 0.0 0.0 128296 2616 pts/49 Ss+ Apr06 0:00 -/bin/bash rblanch+ 12694 0.0 0.0 88780 4052 pts/50 S+ Apr19 0:01 ssh -A vp-pxe01 rblanch+ 12738 0.0 0.0 86708 3960 pts/29 S+ Apr06 0:01 ssh 10.5.8.81 rblanch+ 12750 0.0 0.0 86708 3964 pts/30 S+ Apr06 0:01 ssh 10.5.8.82 rblanch+ 12763 0.0 0.0 86708 3960 pts/31 S+ Apr06 0:01 ssh 10.5.8.83 rblanch+ 12776 0.0 0.0 86708 3964 pts/32 S+ Apr06 0:01 ssh 10.5.8.84 rblanch+ 12789 0.0 0.0 86708 3956 pts/33 S+ Apr06 0:01 ssh 10.5.8.85 rblanch+ 12801 0.0 0.0 86708 3964 pts/34 S+ Apr06 0:01 ssh 10.5.8.86 rblanch+ 12814 0.0 0.0 86852 3960 pts/35 S+ Apr06 0:02 ssh 10.5.8.87 rblanch+ 12827 0.0 0.0 86708 3960 pts/36 S+ Apr06 0:02 ssh 10.5.8.88 rblanch+ 12839 0.0 0.0 86708 3960 pts/37 S+ Apr06 0:01 ssh 10.5.8.91 rblanch+ 12852 0.0 0.0 86708 3960 pts/38 S+ Apr06 0:01 ssh 10.5.8.92 rblanch+ 12867 0.0 0.0 86708 3956 pts/39 S+ Apr06 0:01 ssh 10.5.8.93 rblanch+ 12880 0.0 0.0 86708 3964 pts/40 S+ Apr06 0:01 ssh 10.5.8.94 rblanch+ 12893 0.0 0.0 86852 3960 pts/41 S+ Apr06 0:02 ssh 10.5.8.95 rblanch+ 12919 0.0 0.0 86708 3960 pts/43 S+ Apr06 0:01 ssh 10.5.8.97 rblanch+ 12932 0.0 0.0 86708 3956 pts/44 S+ Apr06 0:01 ssh 10.5.8.98 rblanch+ 12945 0.0 0.0 86708 3960 pts/45 S+ Apr06 0:01 ssh 10.5.8.99 rblanch+ 12958 0.0 0.0 86708 3964 pts/16 S+ Apr06 0:02 ssh 10.5.8.56 rblanch+ 12971 0.0 0.0 86708 3964 pts/11 S+ Apr06 0:02 ssh 10.5.8.51 rblanch+ 12983 0.0 0.0 86708 3960 pts/12 S+ Apr06 0:02 ssh 10.5.8.52 rblanch+ 12996 0.0 0.0 86708 3960 pts/13 S+ Apr06 0:02 ssh 10.5.8.53 rblanch+ 13008 0.0 0.0 86708 3960 pts/14 S+ Apr06 0:02 ssh 10.5.8.54 rblanch+ 13021 0.0 0.0 86708 3956 pts/15 S+ Apr06 0:02 ssh 10.5.8.55 rblanch+ 13034 0.0 0.0 86708 3960 pts/17 S+ Apr06 0:01 ssh 10.5.8.57 rblanch+ 13047 0.0 0.0 86708 3960 pts/18 S+ Apr06 0:01 ssh 10.5.8.58 rblanch+ 13059 0.0 0.0 86708 3960 pts/19 S+ Apr06 0:01 ssh 10.5.8.61 rblanch+ 13072 0.0 0.0 86708 3960 pts/20 S+ Apr06 0:01 ssh 10.5.8.62 rblanch+ 13085 0.0 0.0 86708 3964 pts/21 S+ Apr06 0:01 ssh 10.5.8.63 rblanch+ 13098 0.0 0.0 86708 3960 pts/22 S+ Apr06 0:01 ssh 10.5.8.64 rblanch+ 13111 0.0 0.0 86708 3956 pts/23 S+ Apr06 0:01 ssh 10.5.8.65 rblanch+ 13125 0.0 0.0 86708 3964 pts/24 S+ Apr06 0:01 ssh 10.5.8.66 rblanch+ 13138 0.0 0.0 86708 3964 pts/25 S+ Apr06 0:01 ssh 10.5.8.67 rblanch+ 13151 0.0 0.0 86708 3964 pts/26 S+ Apr06 0:01 ssh 10.5.8.68 rblanch+ 13164 0.0 0.0 86708 3956 pts/27 S+ Apr06 0:01 ssh 10.5.8.69 rblanch+ 13341 0.0 0.0 151652 15080 ? Ss Apr22 0:00 SCREEN -U -S plai-qa rblanch+ 13342 0.0 0.0 128296 2700 pts/119 Ss+ Apr22 0:00 -/bin/bash rblanch+ 14149 0.0 0.0 88784 4020 pts/2 S+ Apr19 0:01 ssh -A vp-kickstart01 rblanch+ 16993 0.0 0.0 86856 4224 pts/7 S+ Apr11 0:01 ssh -A vp-logstash02 root 17616 0.0 0.0 0 0 ? S Apr29 0:29 [kworker/0:2] rblanch+ 18443 0.0 0.0 128304 2704 pts/50 Ss Apr14 0:00 -/bin/bash rblanch+ 19288 0.0 0.0 128608 2984 pts/5 Ss Apr29 0:00 -/bin/bash rblanch+ 19407 0.0 0.0 52864 1020 ? Ss Apr29 0:00 ssh-agent rblanch+ 19475 0.0 0.0 86712 3964 pts/5 S+ Apr29 0:00 ssh -A dev-linad root 19962 0.0 0.0 204512 6708 ? SLs May04 0:00 sshd: tkennedy [priv] root 19965 0.0 0.0 204512 6676 ? SLs May04 0:00 sshd: tkennedy [priv] tkennedy 20051 0.0 0.0 204512 2820 ? S May04 0:00 sshd: tkennedy@notty tkennedy 20052 0.0 0.0 69252 2208 ? Ss May04 0:00 /usr/libexec/openssh/sftp-server tkennedy 20055 0.0 0.0 204656 3372 ? S May04 0:01 sshd: tkennedy@pts/115 tkennedy 20056 0.0 0.0 127832 2148 pts/115 Ss May04 0:00 -bash tkennedy 20138 0.0 0.0 94920 4656 pts/115 S+ May04 0:01 ssh vp-onestore01 rblanch+ 20181 0.0 0.0 88780 4016 pts/107 S+ Apr19 0:01 ssh -A vp-onestore-qa1-01 rblanch+ 22153 0.0 0.0 128612 2956 pts/118 Ss+ May04 0:00 -/bin/bash rblanch+ 23473 0.0 0.2 234496 97860 ? Ss Apr08 2:13 SCREEN -U -S logstash rblanch+ 23474 0.0 0.0 128304 2652 pts/46 Ss Apr08 0:00 -/bin/bash rblanch+ 23563 0.0 0.0 128304 2656 pts/51 Ss Apr08 0:00 -/bin/bash rblanch+ 23653 0.0 0.0 128304 2652 pts/69 Ss Apr08 0:00 -/bin/bash rblanch+ 23744 0.0 0.0 128304 2648 pts/87 Ss Apr08 0:00 -/bin/bash rblanch+ 23833 0.0 0.0 128304 2652 pts/88 Ss Apr08 0:00 -/bin/bash rblanch+ 23922 0.0 0.0 128304 2656 pts/89 Ss Apr08 0:00 -/bin/bash rblanch+ 24017 0.0 0.0 128304 2656 pts/90 Ss Apr08 0:00 -/bin/bash rblanch+ 25999 0.0 0.0 88784 4016 pts/99 S+ Apr26 0:00 ssh -A vp-onestore-uat2-01 rblanch+ 27580 0.0 0.3 253424 116788 ? Ss Apr21 0:02 SCREEN -U -S os-qa-template rblanch+ 27581 0.0 0.0 128308 2700 pts/120 Ss+ Apr21 0:00 -/bin/bash rblanch+ 27674 0.0 0.0 128308 2680 pts/121 Ss+ Apr21 0:00 -/bin/bash rblanch+ 27761 0.0 0.0 128308 2676 pts/122 Ss+ Apr21 0:00 -/bin/bash rblanch+ 27849 0.0 0.0 128308 2680 pts/123 Ss+ Apr21 0:00 -/bin/bash rblanch+ 27936 0.0 0.0 128308 2672 pts/124 Ss+ Apr21 0:00 -/bin/bash rblanch+ 28024 0.0 0.0 128308 2676 pts/125 Ss+ Apr21 0:00 -/bin/bash rblanch+ 28111 0.0 0.0 128308 2680 pts/126 Ss+ Apr21 0:00 -/bin/bash rblanch+ 28198 0.0 0.0 128308 2680 pts/127 Ss+ Apr21 0:00 -/bin/bash root 28453 0.0 0.0 0 0 ? S 01:15 0:00 [kworker/u4:2] rblanch+ 29261 0.0 0.0 128448 2880 pts/116 Ss+ Apr26 0:00 -/bin/bash rblanch+ 29449 0.0 0.4 268936 132356 ? Ss Apr08 0:20 SCREEN -U -S upa-prd rblanch+ 29450 0.0 0.0 128300 2576 pts/91 Ss Apr08 0:00 -/bin/bash rblanch+ 29536 0.0 0.0 89988 5188 pts/91 S+ Apr08 0:09 ssh -A vp-onestore01 rblanch+ 29540 0.0 0.0 128300 2568 pts/92 Ss Apr08 0:00 -/bin/bash rblanch+ 29626 0.0 0.0 88928 4016 pts/92 S+ Apr08 0:02 ssh -A vp-onestore02 rblanch+ 29629 0.0 0.0 128300 2572 pts/93 Ss Apr08 0:00 -/bin/bash rblanch+ 29715 0.0 0.0 88784 4016 pts/93 S+ Apr08 0:01 ssh -A vp-onestore03 rblanch+ 29718 0.0 0.0 128300 2572 pts/94 Ss Apr08 0:00 -/bin/bash rblanch+ 29805 0.0 0.0 88784 4016 pts/94 S+ Apr08 0:01 ssh -A vp-onestore04 rblanch+ 29808 0.0 0.0 128300 2568 pts/95 Ss Apr08 0:00 -/bin/bash rblanch+ 29894 0.0 0.0 88784 4020 pts/95 S+ Apr08 0:01 ssh -A vp-onestore05 rblanch+ 29897 0.0 0.0 128300 2648 pts/96 Ss Apr08 0:00 -/bin/bash rblanch+ 29989 0.0 0.0 88928 4016 pts/96 S+ Apr08 0:01 ssh -A vp-onestore06 rblanch+ 29993 0.0 0.0 128300 2576 pts/97 Ss Apr08 0:00 -/bin/bash rblanch+ 30079 0.0 0.0 88784 4020 pts/97 S+ Apr08 0:01 ssh -A vp-onestore07 rblanch+ 30082 0.0 0.0 128300 2572 pts/98 Ss Apr08 0:00 -/bin/bash rblanch+ 30168 0.0 0.0 88928 4016 pts/98 S+ Apr08 0:02 ssh -A vp-onestore08 rblanch+ 30236 0.0 0.4 271320 134760 ? Ss Apr08 0:02 SCREEN -U -S upa-uat rblanch+ 30237 0.0 0.0 128432 2788 pts/99 Ss Apr08 0:00 -/bin/bash rblanch+ 30327 0.0 0.0 128300 2576 pts/100 Ss Apr08 0:00 -/bin/bash rblanch+ 30413 0.0 0.0 88784 4020 pts/100 S+ Apr08 0:01 ssh -A vp-onestore-uat2-02 rblanch+ 30416 0.0 0.0 128300 2572 pts/101 Ss Apr08 0:00 -/bin/bash rblanch+ 30502 0.0 0.0 88784 4016 pts/101 S+ Apr08 0:01 ssh -A vp-onestore-uat2-03 rblanch+ 30505 0.0 0.0 128300 2572 pts/102 Ss Apr08 0:00 -/bin/bash rblanch+ 30591 0.0 0.0 88784 4020 pts/102 S+ Apr08 0:01 ssh -A vp-onestore-uat2-04 rblanch+ 30596 0.0 0.0 128300 2572 pts/103 Ss Apr08 0:00 -/bin/bash rblanch+ 30655 0.0 0.0 53272 1416 ? Ss Apr07 2:15 ssh-agent rblanch+ 30683 0.0 0.0 88784 4020 pts/103 S+ Apr08 0:01 ssh -A vp-onestore-uat2-05 rblanch+ 30685 0.0 0.0 128300 2576 pts/104 Ss Apr08 0:00 -/bin/bash rblanch+ 30705 0.0 0.0 128748 3108 pts/1 Ss Apr28 0:01 -/bin/bash rblanch+ 30771 0.0 0.0 88784 4016 pts/104 S+ Apr08 0:01 ssh -A vp-onestore-uat2-06 rblanch+ 30774 0.0 0.0 128300 2576 pts/105 Ss Apr08 0:00 -/bin/bash rblanch+ 30807 0.0 0.0 52864 772 ? Ss Apr28 0:00 ssh-agent rblanch+ 30824 0.0 0.0 52864 1024 ? Ss Apr28 0:00 ssh-agent rblanch+ 30860 0.0 0.0 88784 4020 pts/105 S+ Apr08 0:01 ssh -A vp-onestore-uat2-07 rblanch+ 30863 0.0 0.0 128300 2576 pts/106 Ss Apr08 0:00 -/bin/bash rblanch+ 30949 0.0 0.0 90020 5284 pts/106 S+ Apr08 0:01 ssh -A vp-onestore-uat2-08 rblanch+ 30964 0.0 0.3 263096 126468 ? Ss Apr08 0:05 SCREEN -U -S upa-qa rblanch+ 30965 0.0 0.0 128300 2652 pts/107 Ss Apr08 0:00 -/bin/bash rblanch+ 31055 0.0 0.0 128300 2576 pts/108 Ss Apr08 0:00 -/bin/bash rblanch+ 31142 0.0 0.0 88784 4020 pts/108 S+ Apr08 0:01 ssh -A vp-onestore-qa1-02 rblanch+ 31146 0.0 0.0 128300 2572 pts/109 Ss Apr08 0:00 -/bin/bash rblanch+ 31232 0.0 0.0 88784 4016 pts/109 S+ Apr08 0:01 ssh -A vp-onestore-qa1-03 rblanch+ 31235 0.0 0.0 128300 2572 pts/110 Ss Apr08 0:00 -/bin/bash rblanch+ 31321 0.0 0.0 88784 4016 pts/110 S+ Apr08 0:01 ssh -A vp-onestore-qa1-04 rblanch+ 31323 0.0 0.0 128300 2572 pts/111 Ss Apr08 0:00 -/bin/bash rblanch+ 31410 0.0 0.0 88928 4020 pts/111 S+ Apr08 0:01 ssh -A vp-onestore-qa1-05 rblanch+ 31412 0.0 0.0 128300 2568 pts/112 Ss Apr08 0:00 -/bin/bash rblanch+ 31498 0.0 0.0 88784 4012 pts/112 S+ Apr08 0:01 ssh -A vp-onestore-qa1-06 rblanch+ 31522 0.0 0.0 128300 2568 pts/113 Ss Apr08 0:00 -/bin/bash rblanch+ 31608 0.0 0.0 88928 4016 pts/113 S+ Apr08 0:01 ssh -A vp-onestore-qa1-07 rblanch+ 31611 0.0 0.0 128300 2648 pts/114 Ss Apr08 0:00 -/bin/bash rblanch+ 31877 0.0 0.7 373176 236540 ? Ss Apr07 0:31 SCREEN -S OS-uat-hx rblanch+ 31878 0.0 0.0 128296 2640 pts/52 Ss+ Apr07 0:00 -/bin/bash rblanch+ 31959 0.0 0.0 128296 2616 pts/53 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32023 0.0 0.0 86852 3964 pts/46 S+ Apr08 1:31 ssh -A vp-logstash02 rblanch+ 32030 0.0 0.0 128296 2616 pts/54 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32038 0.0 0.0 86852 4224 pts/51 S+ Apr08 0:01 ssh -A vp-logstash02 rblanch+ 32041 0.0 0.0 86708 3964 pts/69 S+ Apr08 0:01 ssh -A vp-logstash02 rblanch+ 32044 0.0 0.0 86708 3960 pts/87 S+ Apr08 0:01 ssh -A vp-logstash02 rblanch+ 32047 0.0 0.0 86852 3956 pts/88 S+ Apr08 0:01 ssh -A vp-logstash02 rblanch+ 32050 0.0 0.0 86708 3960 pts/89 S+ Apr08 0:01 ssh -A vp-logstash02 rblanch+ 32052 0.0 0.0 86708 3964 pts/90 S+ Apr08 0:01 ssh -A vp-logstash02 rblanch+ 32101 0.0 0.0 128296 2612 pts/55 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32173 0.0 0.0 128296 2612 pts/56 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32244 0.0 0.0 128296 2616 pts/57 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32315 0.0 0.0 128296 2612 pts/58 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32386 0.0 0.0 128296 2612 pts/59 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32458 0.0 0.0 128296 2612 pts/60 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32529 0.0 0.0 128296 2612 pts/61 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32600 0.0 0.0 128296 2612 pts/62 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32672 0.0 0.0 128296 2612 pts/63 Ss+ Apr07 0:00 -/bin/bash rblanch+ 32743 0.0 0.0 128296 2612 pts/64 Ss+ Apr07 0:00 -/bin/bash '; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result var_dump($matches);

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php