here's my second question as a complete noob to programming. Having explored command line editing, I am now seeking help with an intricate regex pattern.
This is the issue. I have a large file (approx. 1 Gb). In the file the name in the attribute creationid and changeid have to be changed to a particular string.
Whenever I run the script and compare the files via diff command they turn out to be identical.
I checked my regex with the Tool Expresso, but I think Perl's regex works differently.
This is the string in question:
<tu creationdate="12345Z" changedate="6789Z" creationid="John Doe" cha +ngeid="" lang="de-DE">
changeid might also contain a name
This is the script I've been using in order to replace creationd id. perl -pi.bak -e 's{creationid=".+?"}{creationid="Simon Simonsen"}g;' file.xml
I also tried s{creationid="([^<+])"} as alternative pattern
I appreciate any help on how to improve this script to work through this monstrous file
Thanks a mil in advance
C.In reply to help with regular expression required by PitifulProgrammer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |