Ok, so I've been reading up on regexes, and they're fun!
I've been looking into matching a string like # 54jsfjk
or # ffskkkkkkkkkkkkkkkkk884587923572957
Will the following suffice: /# \w*/i
?
The string I'm trying to replace lives on a single line (there are more lines after), so I guess matching everything after isn't good.
Would making use of the ^
and $
only choose the single line?
The file I am working with looks sort of like this:
HEADER
# stringthatsreplaced
OTHER HEADER
- Stuff
- More Stuff
ANOTHER HEADER
- Even more stuff
- Last stuff