Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I've always loved using perl's regular expressions for finding matching bits of text.

Now, with FM7 and custom functions, I was able to re-create a (somewhat simplified) version of perl's regular expression matcher completely with custom functions.

You can download the file (which includes an explanation of the supported syntax) from my website:

http://www.spf-15.com/fmExamples/

(see "Perl-style Regular Expressions")

To use it, you call the RegexMatch custom function like so:

  RegexMatch( "[email protected]"; "((w+)@w+.(w+))" )



The result is a property list that pulls out the grouped pieces, or empty to indicate no match was possible.  In this case the result is:

$2=mark

$3=com

[email protected]



The RegexMatch function implements the following regular expression syntax:

  @ - any single character (like FM find mode)

  # - any single digit (like FM find mode)

  s - a single whitespace character (perl)

  S - any non-whitespace character

  w - any word character (a..z, A..Z, 0..9, and underscore)

  W - any non-word character

  [a..z5..9 ] - build you own character class

  [^0..9] - inverted character class

  ? - the previous character or group is optional

  * - zero or more occurrences of the previous char or group

  + - one or more occurrences of the previous char or group

I hope to continue to extend this set to become even more perl-like in the future.

Suggestions or bug reports are welcome.

  • 2 weeks later...
  • Author

I've extended this example with a new function:

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.