boundary - Regex for word between symbols -


does knows how make regex looks word between 2 instances of same symbol?

for example, in "gaag gaga $fafaga$afa", need "fafaga", between 2 "$" symbols.

you can use following regex if want 1 match :

\$[^$]*\$ 

note: works matches if use modifier g make global.

see demo

and following matches :

\$.*?\$ 

and if don't want $ can use capture grouping , return group after match :

\$([^$]*)\$ 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -