Google spreadsheet REGEXMATCH wants to detect symbol content but does not return expected value

Asked 1 years ago, Updated 1 years ago, 311 views

In the G spreadsheet, I would like to check if the A3 cell string contains the symbol B3:B32.

The string in A3 is

Expected an int but was BOOLEAN at path$.data.next_page

Assume that

First, put the symbol you want to check in B3:B32 and

=REGEXMATCH(A3,JOIN("|",B3:B32))

However, the reference error was returned as an "invalid regular expression" because the symbols to be checked include brackets, pipes, etc.(Of course)

So,

=REGEXMATCH(A3, "[`~!@#$%^&*()=+[{]}\|;: '', <.>?]")

However, I would like to assume that TRUE warps because the A3 cell string contains "$", but FALSE returned.

I would appreciate it if you could give me some advice on why and what functions should be used to check it properly.

当 As we are studying regular expressions for the second day, please be gentle...

regular-expression google-spreadsheet

2023-01-20 14:54

1 Answers

=REGEXMATCH(A3, "[`~!@#$%^&*()=+[{]}|;: '', <.>?]US>")
However, I would like to assume that TRUE warps because the A3 cell string contains "$", but FALSE returned.

For [ ] where you specify a set of characters in a regular expression, place a backslash before or at the beginning of the set to match the .

=REGEXMATCH(A3, "[]`~!@#$%^&*()=+[{}\|;:'',<.>?]")

For B3:B32, special characters will need to be processed and disabled to have a backslash before them


2023-01-20 20:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.