-
-
-
-
-
-
-
-
-
-
abs
-
acos
-
age
-
alert
-
appendTempFile
-
appointment
-
array
-
Array
-
asin
-
atan
-
atan2
-
avg
-
barcodeScan
-
cached
-
capitalize
-
ceil
-
chosen
-
clientLang
-
closeAllRecords
-
closeFullscreen
-
closeRecord
-
color
-
concat
-
contains
-
cos
-
count (aka cnt)
-
createCalendarEvent
-
createCalendarReminder
-
createTempFile
-
createTextFile
-
createXLSX
-
createZipFile
-
Database operations
-
databaseId
-
date
-
Date and time
-
datetime
-
day
-
days
-
degrees
-
dialog
-
duplicate
-
duration
-
email
-
endof
-
even
-
exp
-
extractx
-
fieldId
-
file
-
fileMetadata
-
files
-
Files and printing
-
fileUrl
-
first
-
floor
-
format
-
Format and convert data
-
formatJSON
-
formatXML
-
Functions overview
-
Functions—alphabetically
-
Functions—by category
-
get
-
html
-
http
-
icon
-
importFile
-
index
-
invalidate
-
isAdminMode
-
isDatabaseLocked
-
isDatabaseProtected
-
item
-
join
-
last
-
latitude
-
length
-
ln
-
loadFileAsBase64
-
loadFileAsBase64URL
-
location
-
log
-
longitude
-
lower
-
lpad
-
Mathematical
-
max
-
min
-
month
-
monthIndex
-
monthName
-
ninoxApp
-
now
-
number
-
numbers
-
odd
-
openFullscreen
-
openPage
-
openPrintLayout
-
openRecord
-
openTable
-
openURL
-
parseCSV
-
parseJSON
-
parseXML
-
phone
-
popupRecord
-
pow
-
printAndSaveRecord
-
printRecord
-
printTable
-
quarter
-
queryConnection
-
radians
-
random
-
range
-
raw
-
record
-
removeFile
-
removeItem
-
renameFile
-
replace
-
replacex
-
round
-
rpad
-
rsort
-
sendCommand
-
sendEmail
-
set
-
setItem
-
shareFile
-
shareView
-
sign
-
sin
-
sleep
-
slice
-
sort
-
split
-
splitx
-
sqr
-
sqrt
-
start
-
string
-
styled
-
substr
-
substring
-
sum
-
tableId
-
tan
-
teamId
-
testx
-
text
-
Text
-
time
-
timeinterval
-
timestamp
-
today
-
trim
-
unique
-
unshareAllViews
-
unshareFile
-
unshareView
-
upper
-
url
-
urlDecode
-
urlEncode
-
urlOf
-
user
-
User interface
-
User management
-
userEmail
-
userFirstName
-
userFullName
-
userHasRole
-
userId
-
userIsAdmin
-
userLastName
-
userName
-
userRole
-
userRoles
-
users
-
validateXML
-
waitForSync
-
Web integration and API
-
week
-
weekday
-
weekdayIndex
-
weekdayName
-
workdays
-
year
-
yearmonth
-
yearquarter
-
yearweek
-
abs
-
-
-
-
-
-
extractx
- updated 6 mths ago
- 5replies
To extract a string from a given text using a regular expression
With this function, you can extract the first match of a search string in a text.
Instead of simple strings as a search pattern, you can use regular expressions (regex). That means you have much more possibilities for text analysis.
You could use this function for example to extract relevant information from imported data.
Using regular expressions might need some extra research. We recommend checking regular expressions on regex101.com (external link).
Syntax
extractx(string, string)
extractx(string, string, string)
extractx(string, string, string, string)
Returns
string
Examples
extractx(myText, regex, flags, extract)
To extract a string from a given text using a regular expression. Flags can be added to the regular expression. The string can be further processed with a given extract.
We have a database with some records in it. We also have …
- an image field My attachment with a file ImportantDocument.pdf
- a formula field File name
Open the field settings of your formula field File name and add the following script to the formula field Formula:
extractx(text('My attachment'), "(.+)\/(.+)", "i", "$2")
Result: In the formula field you will see the name of the attachment: ImportantDocuement.pdf
extractx(myText, regex, extract)
To extract a string from a given text using a regular expression. The string can be further processed with the given extract.
extractx(myText,regex)
To extract a string from a given text using a regular expression.
See also
replacex
which replaces matches of a given regular expression.
substr
which returns a new string out of a given text.
testx
which returns true
if a given text matches a given regular expression.
5 replies
-
- Tekl
- 2 mths ago
- Reported - view
Is there a way to use a variable/field as regex?
-
- Ninox partner
- RoSoft_Steven.1
- 2 mths ago
- Reported - view
TxtRegex is a text field which contains "(.+)\/(.+)", "i", "$2"
let code := --- extractx(text(Image), { TxtRegex }) ---; eval(code, this)
-
- Tekl
- 2 mths ago
- Reported - view
Thank you. Where did you find the documentation for eval() or even know about that command?
I had to add quotes to the regex to avoid errors, when the text field only contains the regex:
let code := --- extractx(text(Image), "{ TxtRegex }") ---; eval(code, this)
-
- Ninox partner
- RoSoft_Steven.1
- 2 mths ago
- Reported - view
-
- Tekl
- 2 mths ago
- Reported - view
Thanks, great idea.