Ask Your Question
3

In Javascript Adobe, what is the method for crafting a regular expression to locate a precise word at the tenth position?

asked 2022-06-04 11:00:00 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-01-21 17:00:00 +0000

huitzilopochtli gravatar image

The regular expression for locating a precise word at the tenth position in JavaScript would be:

/\b\w{9}WORD\b/

where WORD is the word you want to match.

This regular expression will match any word that is exactly at the tenth position in the string. \b represents a word boundary, \w{9} represents any word character occurring exactly 9 times, and the final \b ensures that the word is not a part of a larger word.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-06-04 11:00:00 +0000

Seen: 12 times

Last updated: Jan 21 '23