I need to do a RegExp pattern test on a certain bit of user input. This is the pattern I need to test the value against.
^([a-z]{2,3})\-([a-z][a-z]*[0-9]*)\-(\d+)$
An example match would be: na-examplename-01
The shell I have available is BusyBox a.k.a ash, so I don't have full bash functionality.
What are my options for RegExp pattern tests when using BusyBox?
Note: I cannot use expr, as it is not available in my install.
I have the following functions available:
arp, ash, awk, basename, bash, bunzip2, bzcat, bzip2, cat, chmod,
chown, chvt, clear, cp, crond, crontab, cryptpw, cut, date, dd,
deallocvt, df, dirname, dmesg, dnsdomainname, dos2unix, du, egrep,
eject, env, fbset, fgconsole, fgrep, find, findfs, flock, free, fstrim,
ftpget, ftpput, fuser, getopt, grep, groups, gunzip, gzip, head,
hostname, httpd, hwclock, id, ifconfig, ifdown, ifplugd, ifup, install,
ionice, iostat, ip, kill, killall, killall5, less, ln, loadkmap,
logger, login, ls, lsof, md5sum, mkdir, mkdosfs, mkfifo, mkfs.vfat,
mknod, mkpasswd, mkswap, mktemp, more, mount, mountpoint, mpstat, mv,
nbd-client, nc, netstat, nice, nohup, nslookup, ntpd, od, pgrep, pidof,
ping, ping6, pmap, printenv, ps, pstree, pwd, pwdx, rdate, readlink,
realpath, renice, reset, rm, rmdir, route, sed, seq, setconsole,
setserial, sh, sleep, smemcap, sort, stat, su, switch_root, sync,
sysctl, tail, tar, tee, telnet, time, top, touch, tr, traceroute,
traceroute6, true, ttysize, umount, uname, uniq, unix2dos, unxz,
uptime, usleep, vconfig, vi, watch, wc, wget, which, whoami, whois,
xargs, xz, xzcat, zcat